00001 00022 #include <iostream> 00023 #include "ErrorClass.h" 00024 00025 00026 00027 //using std::string; 00028 using std::cout; 00029 using std::endl; 00030 00031 00032 int main(int argC, char* argV[]){ 00033 // test OS code samples here 00034 cout << "Hello World " << endl; 00035 int k = 1; 00036 try{ 00037 if(k == 1) throw ErrorClass("you can't do that"); 00038 } 00039 catch(const ErrorClass& eclass){ 00040 std::cout << eclass.errormsg << std::endl; 00041 return 0; 00042 } 00043 }// end main 00044