C++ Primer 读书笔记 - 第六章
摘要:        
这一章讲控制结构,和C,Java没区别。跟C不同的是,C++增加了try blocks and Exception Handling#include <iostream>#include <stdexcept>using namespace std;void foo(){ int b = 0; if (b == 0) throw runtime_error("b == 0"); int a = 4/b; cout << a << endl;}void bar() throw(int){ throw 5;}int main(){    阅读全文
        posted @ 2013-05-25 03:59 NULL00 阅读(442) 评论(0) 推荐(0)
                    
                
浙公网安备 33010602011771号