Standard exceptions have a virtual what() method that gives you the message associated with the exception:
int main() {
try {
// your stuff
}
catch( const std::exception & ex ) {
cerr << ex.what() << endl;
}
}
Standard exceptions have a virtual what() method that gives you the message associated with the exception:
int main() {
try {
// your stuff
}
catch( const std::exception & ex ) {
cerr << ex.what() << endl;
}
}