怎么改呢class CChildFrame : public CMDIChildWnd
{
......
public:
static CChildFrame* m_pTopFrame;
};CChildFrame::m_pTopFrame = NULL;编译出错:
Compiling...
ChildFrm.cpp
D:\a83\ChildFrm.cpp(30) : error C2501: 'm_pTopFrame' : missing storage-class or type specifiers
D:\a83\ChildFrm.cpp(30) : error C2040: 'public: static class CChildFrame * CChildFrame::m_pTopFrame' : 'int' differs in levels of indirection from 'class CChildFrame *'
Error executing cl.exe.
{
......
public:
static CChildFrame* m_pTopFrame;
};CChildFrame::m_pTopFrame = NULL;编译出错:
Compiling...
ChildFrm.cpp
D:\a83\ChildFrm.cpp(30) : error C2501: 'm_pTopFrame' : missing storage-class or type specifiers
D:\a83\ChildFrm.cpp(30) : error C2040: 'public: static class CChildFrame * CChildFrame::m_pTopFrame' : 'int' differs in levels of indirection from 'class CChildFrame *'
Error executing cl.exe.
解决方案 »
- vc6与vc2008哪个好学呢?是不是版本越高越好学呢?
- 用无文档视图结构打印预览时,多页时翻页为何"前一页"按钮永远是灰的?(进来有详细说明)
- 我的编辑框怎么突然不响应鼠标消息了啊
- gdi+存储gif文件的问题
- [求助]关于文件的快速拷贝!
- 怎样将对话框(ADD类)输入的数据加到视图(CTestView)的List控件?
- winapi编程是否用的是C编译器?????????
- 帮助文件怎样打开?
- debug 的时候每问题,release 的时候,操作却是非法操作???why???
- VC++编译时fatal error c1033 : can not open program database d:\winmain\debug\vc60.pdb
- 有哪位大牛通俗地讲一下MFC中的虚函数机制,谢过!!!
- 当别的应用使用了钩子后,调用SetWindowsHookEx失败,怎样解决?
那类外是不是要写成int * CChildFrame::a = NULL ;呢?所以,上面那就改成
CChildFrame * CChildFrame::m_pTopFrame = NULL;
就没事儿了