首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

Exception 的有关问题

2012-02-04 
Exception 的问题void__fastcallTMisFormBase::OnXMLError(Exception&ee){}我现在有一个这样的函数签名,如

Exception 的问题
void   __fastcall   TMisFormBase::OnXMLError(Exception   &ee)
{

}

我现在有一个这样的函数签名,如果我想自己生成EXCEPTION给这个函数做参数.应该怎么写的?急等.谢谢大家!

[解决办法]
Exception is the base class for all runtime exceptions.
是一个基类
所以如果你需要使用的话
可以从
class TMyException :public class Exception{

};
继承过来
然后直接throw就应该可以
[解决办法]
Note:Standard practice is to derive all exception classes from Exception, and specify a name beginning with 揈? followed by an abbreviated, descriptive name.

热点排行