User Tools

Site Tools


c_-_c_exception_handling:standard_exceptions

C - C++ Exception Handling - Standard Exceptions

#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;
}
c_-_c_exception_handling/standard_exceptions.txt · Last modified: 2020/07/15 10:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki