首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

cstring有关问题

2012-02-23 
cstring问题?我把.h和.cpp的文件拷到MFC工程下,其中.h和.cpp中有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的项目)

热点排行