摘要: 这提到抛出引用类异常,可是那个指针在try中就被释放了,后面就出现访问错误了,见下面代码:#include using namespace std;class Ex {private: int *id;public: Ex() { id = new int; } ~Ex() { delete id; id = NULL; } int errorId() { return *id; }};void fun() throw (Ex, Ex*) { Ex *ee = NULL; try { Ex ... 阅读全文
posted @ 2013-09-16 10:57 litstrong 阅读(128) 评论(0) 推荐(0)