#include #include using namespace std; void fonction ( const int i ) throw () { if ( i == 2 ) { throw Out_Of_Range("Erreur") ; } cout << "i est ok" << endl ; } int main () { try { fonction (2) ; } catch ( const Out_Of_Range & e ) { cout << e.what() ; } }