我尝试退出应用程序(需要了解 Visual C++ 程序的基本结构),但不接受 MSDN 的代码。我究竟做错了什么?
private: System::Void exitToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
}
Application::Exit(); };
运行此代码时出现错误:
error C3254: 'Program::Form1' : class contains explicit override 'Exit' but does not derive from an interface that contains the function declaration
error C2838: 'Exit' : illegal qualified name in member declaration
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
warning C4183: 'Exit': missing return type; assumed to be a member function returning 'int'
我找不到任何有用的信息,今天是我尝试 VS 2008 的第一天。