[c++] exception with no throw

来源:互联网 发布:淘宝seo搜索优化技巧 编辑:程序博客网 时间:2024/06/05 02:43
#include <stdio.h>int foo() throw(){printf("in none throw foo.\n");throw 0;return 0;}int main(){try{foo();}catch(...){printf("catch exception.\n");}printf("finished.\n");return 0;}

0 0
原创粉丝点击