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
1,编写代码,hello.cpp
#include <iostream>
using namespace std;
int main(){
cout<<"hello world"<<endl;
return 0;
}
2,编译
$ g++ hello.cpp -o hello
$./hello