centos下编译c++
时间:2014-05-25 22:19:17
收藏:0
阅读:468
前提条件是已经安装了g++
要是没有安装,就
yum install g++
1,编写Hello.cpp
1>vim
2>
#include <stdio>
int main()
{
printf("Hello,the world!");
return 0;
}
3>
:w hello.cpp
2,退出vim !q
3,编译
#g++ -o hello hello.cpp
#./hello
就可以看到屏幕显示:
Hello,the world.
成功了,呵呵!
评论(0)