standard exceptions : standard exceptions « Exceptions « C++ Tutorial






#include <iostream.h>
#include <exception>
#include <typeinfo>

class A {};

int main () {
  try {
    A * a = NULL;
    typeid (*a);
  }
  catch (std::exception& e)
  {
    cout << "Exception: " << e.what();
  }
  return 0;
}








6.8.standard exceptions
6.8.1.standard exceptions