try
{
}
catch(CException* e)
{
e->ReportError();
}
__finally
{
}出错
error C2143: syntax error : missing ';' before '__finally'
是什么问题?代码并没有missing ';'啊
{
}
catch(CException* e)
{
e->ReportError();
}
__finally
{
}出错
error C2143: syntax error : missing ';' before '__finally'
是什么问题?代码并没有missing ';'啊
解决方案 »
- GetPrivateProfileString读取ini文件的问题!
- 请教BeautyQQ里面的类 lib的问题
- 小菜鸟继续请教高手们问题!!!!!!!!
- 关于取系统路径的问题
- 如何写一个程序可以给另一个程序发消息!
- 怎样得到一个自定义资源的长度?anxious!!waiting on line...
- 请教如何读出clistctrl中的某一行某一列上的值
- 请各位高手赐教!要用VC++6.0做一个文本编辑器怎么做?如果有源码,在下不胜感激
- 救命~!!!服务器总过20分钟左右就出现CPU占用60%以上,导致系统忙,必须重启才能恢复,为什么
- 想考个证书,MCSD证书有用吗?考证费用多少?
- 如何在一个包含n个视频流的avi文件里面读第m个视频流?
- 请教一下简单问题,recv有可能同时接收到两个包吗?
f();
}
catch (MyException *e) {
System::Console::WriteLine("in catch");
System::Console::WriteLine(e->GetType());
}
__finally {
System::Console::WriteLine("in finally");
}
msdn的代码
楼上的 不行啊
1.C++ exception handling (try, throw, catch)
2.Structured exception handling (__try/__except, __try/__finally) Although structured exception handling works with C and C++ source files, it is not specifically designed for C++. For C++ programs, you should use C++ exception handling.Note In this section, the terms “structured exception handling” and “structured exception” (or “C exception”) refer exclusively to the structured exception handling mechanism provided by Win32. All other references to exception handling (or “C++ exception”) refer to the C++ exception handling mechanism.
__try{
__try
{
}
__finally
{
}
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
}