try catch not working c++ code example
Example: C++ try catch
try {
//do something
} catch (const std::exception& e) {
std::cout << e.what(); // information from error printed
}
try {
//do something
} catch (const std::exception& e) {
std::cout << e.what(); // information from error printed
}