Cyber Security Kangceptautomation.blog.chinaunix.net
kxj99
malware/APT detection, silicon valley, entrepreneur, CTO, start-up operation, team build, Nanjing/Beijing, if you want to do creative things, join the adventure.
全部博文(47)
分类: C/C++
2008-05-01 07:20:46
#include <iostream> using namespace std; int handleException(int); int main(int argc, char** argv){ int n[] = {1,2,3,4,5}; try{ cout << "in try block\n"; throw 123.9; cout << "never go here"; }catch(int i){ cout << "int catch block: " << i << endl; }catch(char c){ cout << "char catch block: " << c << endl; }catch(...){ cout << "catch all exception" << endl; } try{ handleException(10); }catch(char* str){ cout << "char* exception: "<< str << endl; }catch(int i){ cout << "int exception: "<< i << endl; } return 0; } int handleException(int i) throw(int, char, double) { throw ; }
上一篇:Basic I/O
下一篇:PSP Game List in Beijing
登录 注册