| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 921 人关注过本帖
标题:C++中编译通过的程序拷进MFC咋就不能用了?
只看楼主 加入收藏
毕业旅行
Rank: 4
等 级:业余侠客
威 望:1
帖 子:130
专家分:280
注 册:2010-7-7
结帖率:100%
收藏
 问题点数:0 回复次数:1 
C++中编译通过的程序拷进MFC咋就不能用了?
我觉得是string的问题,但是不知道咋修改。。
我在对话框里添加了两个函数
格式是这样的string calculate(string str){…………}
            string bracket(string str){…………}
下面是报错。

d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2146: syntax error : missing ';' before identifier 'bracket'
d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2501: 'string' : missing storage-class or type specifiers
d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2061: syntax error : identifier 'string'
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2146: syntax error : missing ';' before identifier 'calculate'
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2501: 'string' : missing storage-class or type specifiers
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2061: syntax error : identifier 'string'
EX_24Dlg.cpp
d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2146: syntax error : missing ';' before identifier 'bracket'
d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2501: 'string' : missing storage-class or type specifiers
d:\应用程序编程\ex_24\ex_24dlg.h(18) : error C2061: syntax error : identifier 'string'
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2146: syntax error : missing ';' before identifier 'calculate'
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2501: 'string' : missing storage-class or type specifiers
d:\应用程序编程\ex_24\ex_24dlg.h(19) : error C2061: syntax error : identifier 'string'
D:\应用程序编程\EX_24\EX_24Dlg.cpp(217) : error C2143: syntax error : missing ';' before 'tag::id'
D:\应用程序编程\EX_24\EX_24Dlg.cpp(217) : error C2501: 'string' : missing storage-class or type specifiers
D:\应用程序编程\EX_24\EX_24Dlg.cpp(217) : fatal error C1004: unexpected end of file found
搜索更多相关主题的帖子: MFC 编译 
2010-08-23 11:06
毕业旅行
Rank: 4
等 级:业余侠客
威 望:1
帖 子:130
专家分:280
注 册:2010-7-7
收藏
得分:0 
研究了很久。。。搞定了

刚才头文件位置一直加的不对,要加在类的定义的那个文件里,呵呵
2010-08-23 11:46
快速回复:C++中编译通过的程序拷进MFC咋就不能用了?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014734 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved