c++程序问题,提示error LNK2001
#include<afxwin.h>classCHelloApp:publicCWinApp{public:virtualBOOLInitInstance();};CHe...
#include <afxwin.h>
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp HelloApp;
class CHelloWindow:public CFrameWnd
{
CStatic* cs;
public:
CHelloWindow();
};
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CHelloWindow();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
CHelloWindow::CHelloWindow(){
Create(NULL,
"Hello World!",
WS_OVERLAPPEDWINDOW,
CRect(0,0,200,200));
cs=new CStatic();
cs->Create("hello world",
WS_CHILD|WS_VISIBLE|SS_CENTER,
CRect(50,80,150,100),
this);
} 展开
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp HelloApp;
class CHelloWindow:public CFrameWnd
{
CStatic* cs;
public:
CHelloWindow();
};
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CHelloWindow();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
CHelloWindow::CHelloWindow(){
Create(NULL,
"Hello World!",
WS_OVERLAPPEDWINDOW,
CRect(0,0,200,200));
cs=new CStatic();
cs->Create("hello world",
WS_CHILD|WS_VISIBLE|SS_CENTER,
CRect(50,80,150,100),
this);
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询