安装g++
yum install -y gcc-c++
使用cpp后缀名
使用g++编译
g++ helloworld.cpp
cat helloworld.cpp
# include <iostream>
int main(){
using namespace std;
cout <<"Hello world\n";
return 0;
}
g++ helloworld.cpp
./a.out
Hello world
centos配置g++
最新推荐文章于 2024-05-24 09:30:43 发布