[問題] C++檔案錯誤無法開啟
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++2008
錯誤結果(Wrong Output):
建置成功 但案偵錯時卻不能開啟
跳出視窗
Debug Assertion Failed!
Program:...18\My Documents\Visual Stadio 2008\Projects\123\Debug\123.exe
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winocc.cpp
Line:329
For imformation on how your program can cause an assertion failure, see
the Visual C++ documentation on asserts.
(Please Retry to debug the application)
中止(A) 重試(R) 略過(I)
程式碼(Code):(請善用置底文網頁, 記得排版)
#include <afxwin.h>
#include "resource.h"
class CFirstFrame : public CFrameWnd {
private:
CMenu *FMenu;
public:
CFirstFrame() {
Create(NULL, _T("Menu Resource Demo"));
FMenu = new CMenu;
FMenu->LoadMenu(IDR_MENU1);
SetMenu(FMenu);
}
} ;
class CFirstApp : public CWinApp {
public:
BOOL InitInstance() {
CFrameWnd *Frame = new CFrameWnd();
m_pMainWnd = Frame;
Frame->ShowWindow(SW_SHOW);
return true;
}
} ;
CFirstApp a_app;
補充說明(Supplement):
剛開始接觸式窗程式設計,請大家幫幫忙。 謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.123.224.118
推
04/18 02:01, , 1F
04/18 02:01, 1F
→
04/18 02:27, , 2F
04/18 02:27, 2F
推
04/18 02:37, , 3F
04/18 02:37, 3F
→
04/18 02:44, , 4F
04/18 02:44, 4F