| 查看: 1349 | 回复: 7 | |||
| 本帖产生 1 个 程序强帖 ,点击这里进行查看 | |||
[交流]
【求助】一个程序,不同编译器结果不同【已完结】 已有2人参与
|
|||
|
这个程序用VC编译没问题,但是用mingw develop studio编译出现以下错误: In file included from C:\MinGWStudio\MinGW\include\c++\3.3.1\backward\iostream.h:31, from ggg.cpp:1: C:\MinGWStudio\MinGW\include\c++\3.3.1\backward\backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the ggg.cpp: In function `char* fun(STRU*, int)': ggg.cpp:30: error: name lookup of `i' changed for new ISO `for' scoping ggg.cpp:22: error: using obsolete binding at `i' ggg.cpp: At global scope: ggg.cpp:45: error: `main' must return `int' ggg.cpp:45: error: return type for `main' changed to `int' ggg.o - 4 error(s), 1 warning(s) [ Last edited by nono2009 on 2010-11-11 at 07:31 ] |
» 猜你喜欢
职称评审没过,求安慰
已经有41人回复
回收溶剂求助
已经有7人回复
硝基苯如何除去
已经有3人回复
A期刊撤稿
已经有4人回复
垃圾破二本职称评审标准
已经有17人回复
投稿Elsevier的Neoplasia杂志,到最后选publishing options时页面空白,不能完成投稿
已经有22人回复
EST投稿状态问题
已经有7人回复
毕业后当辅导员了,天天各种学生超烦
已经有4人回复
求助文献
已经有3人回复
三无产品还有机会吗
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
请热心人能提供一个带imsl库的intel visual fortran编译器下载链接
已经有6人回复
intel fortran局部变量自动更新
已经有19人回复
三维数组换行输入到文件(intel fortran 编译器)
已经有6人回复
复制构造函数问题
已经有14人回复
写了一个fortran90的小程序,编译通不过,请大侠帮忙
已经有59人回复

★
zyj8119(金币+10):谢谢您精彩的回复!!!! 2010-11-03 07:21:37
nono2009(金币+1, 程序强帖+1):鼓励应助 2010-11-11 07:31:20
zyj8119(金币+10):谢谢您精彩的回复!!!! 2010-11-03 07:21:37
nono2009(金币+1, 程序强帖+1):鼓励应助 2010-11-11 07:31:20
|
从目前的编译信息来看: warning: #warning This file includes at least one deprecated or antiquated header. 你这段代码包含了不赞成的或者是老标准的文件头, Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. 参看 C++ Standard 的 17.4.1.2 (我看了,里面没有 .h ) Examples include substituting the 用<******>代替<******.h>(把.h去掉), 或者用 To disable this warning use -Wno-deprecated. 编译器版本的问题,目前的信息看来。 根据编译的信息作修改先,不行的话去看 C++ standard 的 17.4.1.2 部分的内容。 再不行的话,帖出编译信息。 ---------------------------另: 刚才我在虚拟机里装了个WinGW 2.05, 重现了你的代码错误, C:\MinGWStudio\MinGW\include\c++\3.3.1\backward\backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the 去掉 .h 后, 反正上面重现的这段编译错误没有了。 ----------------------------- 哎,查了查,试了试, 编译器的问题,或者说标准的问题。 你试下这段代码把,我这里仅仅是编译通过了。 revised 是修改的地方。 为什么这么修改,我也是根据你的编译信息,google了一下而已。 要符合你的程序需求,可能还要调一下。 编译器之间的问题还是要重视的。 [ Last edited by gd88 on 2010-11-3 at 04:47 ] |
2楼2010-11-03 03:05:06

3楼2010-11-03 07:21:19

4楼2010-11-03 07:25:52

5楼2010-11-03 18:08:01

6楼2010-11-09 20:13:11

7楼2010-11-09 20:35:07

8楼2010-11-09 20:42:18













回复此楼