我复制
if ((MessageBox::Show(
"Are you sure that you would like to close the form?",
"Form Closing", MessageBoxButtons::YesNo,
MessageBoxIcon::Question) == DialogResult::No))
{
// cancel the closure of the form.
Application::Exit();
}
来自msdn . 我编译的地方我有
1> ------ Build build:项目:test2,配置:调试Win32 ------ 1> test2.cpp 1> c:\ users \kredkołamacz\ documents \ visual studio 2010 \ projects \ test2 \ test2 \ Form1.h(103):错误C2039:'否':不是'System :: Windows :: Forms :: Form :: DialogResult'1> c:\ users \kredkołamacz\ documents \ visual studio 2010的成员\ projects \ test2 \ test2 \ Form1.h(16):查看'System :: Windows :: Forms :: Form :: DialogResult'1> c> \ users \kredkołamacz\ documents \ visual studio 2010 \ projects \ test2的声明\ test2 \ Form1.h(103):错误C2065:'否':未声明的标识符==========构建:0成功,1失败,0最新,0跳过==== ======
怎么了?怎么解决这个问题?