c++ 从标准异常类别(Exception Classes)派生新类别
摘要:
(1)直接派生自exception,自己实现what()函数。namespace MyLib { /* user-defined exception class * derived from a standard class for exceptions */ class MyProblem : public std::exception { public: … MyProblem(…) { // special constructor } virtual const char* what() const throw() { // what() function... 阅读全文
posted @ 2012-12-30 14:18 zhuyf87 阅读(492) 评论(0) 推荐(0) 编辑