正在加载图片...
class Demo public: Demo(){cout <"Constructor of Demo"< endl; ~Demo(){cout <"Destructor of Demo"< endl; void func()throw (MyException){ Demo d; cout <"Throw MyException in func()"<< endl; throw MyException("exception thrown by func ()")class Demo { public: Demo() { cout << "Constructor of Demo" << endl; } ~Demo() { cout << "Destructor of Demo" << endl; } }; void func() throw (MyException) { Demo d; cout << "Throw MyException in func()" << endl; throw MyException("exception thrown by func()"); } 10
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有