linux - g++编译,总是提示头文件fstream错误
天蓬老师
天蓬老师 2017-04-17 17:08:18
0
3
604

代码很简单,但是总是提示fstream头文件有错误,操作系统是centos7 64位。

#include <fstream>
#include <iostream>
using namespace std;

int main()
{
    cout<<"hello,world"<<endl;
    return 0;
}

编译报如下错误:
[root@mystudy test]# g++ -o test test.cpp
In file included from /usr/include/c++/4.8.2/fstream:41:0,

             from test.cpp:1:

/usr/include/c++/4.8.2/cstdio:120:11: error: '::ets' has not been declared
using ::ets;

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!