User Tools

Site Tools


c_-_c_exception_handling:c_standard_exceptions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c_-_c_exception_handling:c_standard_exceptions [2017/10/12 10:26] – created peterc_-_c_exception_handling:c_standard_exceptions [2017/10/12 10:34] (current) – removed peter
Line 1: Line 1:
-====== C - C++ Exception Handling - C++ Standard Exceptions ====== 
- 
-<code cpp> 
-#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; 
-} 
-</code> 
  
c_-_c_exception_handling/c_standard_exceptions.1507803975.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki