为什么提示是过时呢?

j19906231 2011-05-29 05:16:44
#include<iostream.h>
#define YEARS 365 //一年的天数
#define HOURS 24 //一天的小时数
#define MONTHS 12 //一年的月份数
int main()
{
const double pi=3.1415926; //圆周率
const float max=100; //最大值
cout<<"圆周率"<<pi<<endl;
cout<<"一年的天数"<<YEARS<<endl;
cout<<"一天中的小时数为"<<HOURS<<endl;
cout<<"一年的月份数为"<<MONTHS<<endl;
cout<<"最大值"<<max<<endl;
return 0;
}
上面那个是照书上写的。

编译成功!!!
警告:4 错误:0
In file included from D:/st-edit/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward/iostream.h:31,
from 行1:
D:/st-edit/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward/backward_警告.h:32:2: 警告: #警告 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 <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this 警告 use -Wno-deprecated.
这个是下面的东西。为什么提示说过时呢?在这里是警告,在VC里也是警告。真晕了。哪位大虾指教下。

还有能介绍本好点的书吗?我看过好多书了。那些该死一万年的畜生啊,花那么钱,写错几个字还可以原谅,图都是错的,真晕了。本本都是害人啊!5555
...全文
123 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
j19906231 2011-05-30
  • 打赏
  • 举报
回复
累,我用C#写了写,发现可以,那个我还发现,我用C++写的时候,会有代码末尾没有换行的提示,用C#写的时候,那个警告就没了。难道我不能使用C++?55555,太伤心了。只能继续学C#了。伤心!
另外,我上面那个问题解决了。这个帖子可以删了是吧。怎么删。我是菜鸟。
j19906231 2011-05-30
  • 打赏
  • 举报
回复
原来如此,谢谢了啊!还有,我是完全自学C# C++ 可能会有些白痴问题。不要生气!呵呵!
pingdan32 2011-05-29
  • 打赏
  • 举报
回复
额~~~~~名字空间~~~~~
#include <iostream>
using namespace std;
xspace_time 2011-05-29
  • 打赏
  • 举报
回复
书是死的,人是活的
KID_coder 2011-05-29
  • 打赏
  • 举报
回复
vc6...
--------------------Configuration: main - Win32 Debug--------------------
Compiling...
main.cpp
Linking...

main.exe - 0 error(s), 0 warning(s)
ljt3969636 2011-05-29
  • 打赏
  • 举报
回复
#include<iostream>
using namespace std;

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧