当前位置: 技术问答>linux和unix
才学C for linux,这个出错信息是什么意思?
来源: 互联网 发布时间:2015-06-07
本文导语: #include //or #include 都出错地说 int main(){ return 0; } g++ test.cpp -o test In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from test.cpp:1: /usr/include/c++/3.2.2/backward/backward_warning.h:32:2:warning:#warning This file include...
#include //or #include 都出错地说
int main(){
return 0;
}
g++ test.cpp -o test
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from test.cpp:1:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2:warning:#warning This file includes at least ont deprecated or antiquated header.Please consider using ont of the 32 headers found in section 17.4.1.2 of the C++ standare.Examples include substrtiting the header for the header for C++ includes,or instead of deprecated header .To disable this warning use -Wno-deprecated.
以前只在Windows下写过C程序 Linux刚刚搞 请大家多多关照
int main(){
return 0;
}
g++ test.cpp -o test
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from test.cpp:1:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2:warning:#warning This file includes at least ont deprecated or antiquated header.Please consider using ont of the 32 headers found in section 17.4.1.2 of the C++ standare.Examples include substrtiting the header for the header for C++ includes,or instead of deprecated header .To disable this warning use -Wno-deprecated.
以前只在Windows下写过C程序 Linux刚刚搞 请大家多多关照
|
using namespace std;
是个标准用法。不然你编译的时候要加一个lib
|
在包含头文件下边加一行:
using namespace std;
using namespace std;
|
我在自己的机器上redhat 7.3下写程序,#include or #include 都一样。你在return 0前加一句输出比如
cout
cout
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!