CentOS运行C++语言的Hello World

1,编写代码,hello.cpp

#include <iostream>
using namespace std;
int main(){
   cout<<"hello world"<<endl;
   return 0;
}

2,编译

$ g++ hello.cpp -o hello

$./hello

posted on 2016-04-27 09:00  张三的哥哥  阅读(602)  评论(0编辑  收藏  举报