I'm doing a drill that's says to use simple_error(). I'm having a hard time finding infomation on it. What header is simple_error() from? And how do you use it?
simple_error() doesn't exist as far as I've been able to search. I found a reference to it on the creator's website, but it was a personally built one. If you're taking a class, maybe you'll have to look back through your notes or your text book for a reference. Stroustrup's example was as follows:
1 2 3 4 5 6 7
// error function to be used (only) until error() is introduced in Chapter 5:
inlinevoid simple_error(string s) // write ``error: sТТ and exit program
{
cerr << "error: " << s << '\n';
keep_window_open(); // for some Windows environments
exit(1);
}