平邑政府公示王立剑:编译C++有以下错误,如何解决?是什么意思

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/14 11:42:30
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 <X> header for the <X.h> \
header for C++ includes, or <iostream> instead of the deprecated header \
<iostream.h>. To disable this warning use -Wno-deprecated.
第一个错误如下:
3 D:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from F:\xiay.cpp In file included from D:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from F:\xiay.cpp

包含头文件有两种写法
下面这种是新的C++标准支持的,也是推荐使用的写法
#include <iostream>
using namespace std;
下面这种是以前的写法,现在也可以用,但是不推荐
#include <iostream.h>

不用解决,只是编译速度慢一点没别的影响,你用的一些头文件太老,已经不用了,改成新的就没有这个警告了,