码迷,mamicode.com
首页 > 编程语言 > 详细

CentOS运行C++语言的Hello World

时间:2016-04-27 09:38:11      阅读:1013      评论:0      收藏:0      [点我收藏+]

标签:

1,编写代码,hello.cpp

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

2,编译

$ g++ hello.cpp -o hello

$./hello

CentOS运行C++语言的Hello World

标签:

原文地址:http://www.cnblogs.com/usa007lhy/p/5437497.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!