简单的Hello word 问题(g++)
#include "iostream"
using namespace std;
int main()
{
cout << "Hello word" << endl;
return 0;
}
g++ -o first first.cpp
为什么会出问题
In file included from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/iosfwd:46,
from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/ios:44,
from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/ostream:45,
from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/iostream:45,
from first.cpp:1:
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/i386-redhat-linux/bits/c++locale.h:55: error: `uselocale' was not declared in this scope
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/i386-redhat-linux/bits/c++locale.h:55: error: invalid type in declaration before ';' token
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/i386-redhat-linux/bits/c++locale.h: In function `int std::__convert_from_v(char*, int, const char*, _Tv, __locale_struct* const&, int)':
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/i386-redhat-linux/bits/c++locale.h:73: error: `__gnu_cxx::__uselocale' cannot be used as a function
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/i386-redhat-linux/bits/c++locale.h:90: error: `__gnu_cxx::__uselocale' cannot be used as a function