免维护电瓶修复方法:编个小程序,除了一串问题,谁帮我看一下啊,谢谢

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 13:52:39
以下是错误提示,就是想做个打开bmp图像的而已……
E:\bysj\试验中\图想\MainFrm.cpp(112) : error C2065: 'CMyDoc' : undeclared identifier
E:\bysj\试验中\图想\MainFrm.cpp(112) : error C2065: 'pDoc' : undeclared identifier
E:\bysj\试验中\图想\MainFrm.cpp(112) : error C2065: 'GetDocment' : undeclared identifier
E:\bysj\试验中\图想\MainFrm.cpp(112) : error C2106: '=' : left operand must be l-value
E:\bysj\试验中\图想\MainFrm.cpp(118) : error C2001: newline in constant
E:\bysj\试验中\图想\MainFrm.cpp(118) : fatal error C1057: unexpected end of file in macro expansion
图想.cpp
e:\bysj\试验中\图想\图像view.h(17) : error C2146: syntax error : missing ';' before identifier 'Bmpname'
e:\bysj\试验中\图想\图像view.h(17) : error C2501: 'Cstring' : missing storage-class or type specifiers
e:\bysj\试验中\图想\图像view.h(17) : error C2501: 'Bmpname' : missing storage-class or type specifiers
e:\bysj\试验中\图想\图像view.h(19) : error C2061: syntax error : identifier 'Cstring'
图像View.cpp
e:\bysj\试验中\图想\图像view.h(17) : error C2146: syntax error : missing ';' before identifier 'Bmpname'
e:\bysj\试验中\图想\图像view.h(17) : error C2501: 'Cstring' : missing storage-class or type specifiers
e:\bysj\试验中\图想\图像view.h(17) : error C2501: 'Bmpname' : missing storage-class or type specifiers
e:\bysj\试验中\图想\图像view.h(19) : error C2061: syntax error : identifier 'Cstring'
E:\bysj\试验中\图想\图像View.cpp(67) : error C2065: 'm_bitmap' : undeclared identifier
E:\bysj\试验中\图想\图像View.cpp(67) : error C2228: left of '.GetBitmap' must have class/struct/union type
E:\bysj\试验中\图想\图像View.cpp(69) : error C2039: 'Width' : is not a member of 'tagBITMAP'(这个已经修改了)

错误主要都是指向下面几句的:
CMyDoc* pDoc=GetDocment();
CFileDialog dlg(TRUE,_T("BMP"),_T("*.BMP),OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,_T("位图文件(*.BMP)|*.BMP"));
void Showpictute(Cstring Bmpname);
m_bitmap.GetBitmap(&bm);
Cstring Bmpname;
回1楼的话,这个我不太会用来着……

楼主的这个程序不是用向导生成的吧?可能在View类中忘了包含Doc类的头文件

没定义CMyDoc,使用前别忘了包含类声明的头文件

CMyDoc类没有定义啊!

用错误检验try语句

用错误检验try语句