标签:
1 #include <iostream> 2 using namespace std; 3 4 void show() throw (int) 5 { 6 throw double(2); 7 } 8 9 int main() 10 { 11 try{ 12 show(); 13 } 14 catch (double eobj) 15 { 16 cout << eobj << endl; 17 } 18 catch (int eobj) 19 { 20 cout << eobj << endl; 21 } 22 23 return 0; 24 }
标签:
原文地址:http://www.cnblogs.com/lijinping/p/5875118.html