2012年4月25日

摘要: 看了下thinking in c++ v2 中的 exception handling, 这里简单总结下C++语言层面exception handling理解1 . throw, try , catchthrow expression; 这是在程序普通地方用的, expression总是有一个类型的, 也就是说可以抛出任意一个 type 的 object;throw ; 是在 catch 语句里面使用的, 把接收到的object再次抛出, 当然在catch中也可以再抛出任意type的异常 1 #include <iostream> 2 using namespace std; 3 阅读全文
posted @ 2012-04-25 20:31 小宇2 阅读(2075) 评论(0) 推荐(0) 编辑

导航