cstring有关问题
cstring问题?
我把.h和.cpp的文件拷到MFC工程下,其中.h和.cpp中有cstring,当运行时就有问题,请问是什么问题?
rror C2146: syntax error : missing '; ' before identifier 'getErrorString '
f:\调试盘\reciter\head.h(44) : error C2501: 'CString ' : missing storage-class or type specifiers
f:\调试盘\reciter\head.h(47) : warning C4183: 'getErrorString ': member function definition looks like a ctor, but name does not match enclosing class
f:\调试盘\reciter\head.h(50) : error C2146: syntax error : missing '; ' before identifier 'm '
f:\调试盘\reciter\head.h(50) : error C2501: 'CString ' : missing storage-class or type specifiers
f:\调试盘\reciter\head.h(50) : error C2501: 'm ' : missing storage-class or type specifiers
Reciter.cpp
Error executing cl.exe.
------解决方案--------------------
把代码粘上来
------解决方案--------------------
头文件都加了没,检查下.
------解决方案--------------------
需要支持MFC的程序才能用CString,最少得包含afx.h吧
------解决方案--------------------
在你的cstring的头文件里要包含“stdafx.h "(MFC的项目)
我把.h和.cpp的文件拷到MFC工程下,其中.h和.cpp中有cstring,当运行时就有问题,请问是什么问题?
rror C2146: syntax error : missing '; ' before identifier 'getErrorString '
f:\调试盘\reciter\head.h(44) : error C2501: 'CString ' : missing storage-class or type specifiers
f:\调试盘\reciter\head.h(47) : warning C4183: 'getErrorString ': member function definition looks like a ctor, but name does not match enclosing class
f:\调试盘\reciter\head.h(50) : error C2146: syntax error : missing '; ' before identifier 'm '
f:\调试盘\reciter\head.h(50) : error C2501: 'CString ' : missing storage-class or type specifiers
f:\调试盘\reciter\head.h(50) : error C2501: 'm ' : missing storage-class or type specifiers
Reciter.cpp
Error executing cl.exe.
------解决方案--------------------
把代码粘上来
------解决方案--------------------
头文件都加了没,检查下.
------解决方案--------------------
需要支持MFC的程序才能用CString,最少得包含afx.h吧
------解决方案--------------------
在你的cstring的头文件里要包含“stdafx.h "(MFC的项目)