代码很简单,但是总是提示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;