- 论坛徽章:
- 0
|
问一个菜问题---怎么在FREEBSD下用C++?
...
楼主看一下编译信息,原因和解决的办法都在这里解释得很清楚了呀!
bash-2.05b$ g++ Hello.cpp -o hello
In file included from /usr/include/g++/backward/iostream.h:31,
from Hello.cpp:1:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #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 <sstream>; instead of the deprecated header <strstream.h>;. To disable this warning use -Wno-deprecated.
或者是:
bash-2.05b$ g++ file2.C -o file2
file2.C: In function `int main()':
file2.C:5: `cout' undeclared (first use this function)
file2.C:5: (Each undeclared identifier is reported only once for each function
it appears in.)
file2.C:7: `cin' undeclared (first use this function) |
|