为什么提示是过时呢?
#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