// range_error.cpp // compile with: /EHsc /GR #include #include #include using namespace std; int main() { try { throw range_error( "The range is in error!" ); } catch (exception &e) { cerr << "Caught: " << e.what( ) << endl; cerr << "Type: " << typeid( e ).name( ) << endl; }; }