1.c++代码hello.cpp
#include<iostream>
using namespace std;
int main(){
cout << "hello world" << endl;
return 0;
}
2.编译
g++ -o hello hello.cpp
编译后生成hello可执行文件
3.执行
./hello
1.c++代码hello.cpp
#include<iostream>
using namespace std;
int main(){
cout << "hello world" << endl;
return 0;
}
2.编译
g++ -o hello hello.cpp
编译后生成hello可执行文件
3.执行
./hello