Topic: "exit" not legit keyword?

Get this error, In function 'void NR::nrerror(std::__cxx11::string)':, nrutil_nr.h:56:9: error: 'exit' was not declared in this scope

I am trying to compile the annealing example in legacy cpp code. 

The code fragment giving me grief appears to be:
    {
        cerr << "Numerical Recipes run-time error..." << endl;
        cerr << error_text << endl;
        cerr << "...now exiting to system..." << endl;
        exit(1);
    }
Compiler does not like the exit keyword.

Thanks for any help
kevington

Re: "exit" not legit keyword?

I believe exit is only a C keyword.  You probably just need to include cstdlib to bring exit into scope.  I would suggest looking at the example here:

http://en.cppreference.com/w/cpp/utility/program/exit

Jeff Armstrong
Approximatrix, LLC