标签:using vim c++ color NPU localhost error: 工作 director
1、准备工作:安装gcc编译环境
yum install gcc-c++
2、创建cpp文件
[root@localhost demo]# touch test.cpp
[root@localhost demo]# vim test.cpp
#include <iostream> using namespace std; int main(){ cout<<"hello world"; }
3、编译运行文件 (注:书写格式)
[root@localhost demo]# g++ -o test.cpp test g++: error: test: No such file or directory g++: fatal error: no input files
[root@localhost demo]# vim test.cpp [root@localhost demo]# g++ test.cpp -o test [root@localhost demo]# ls test test.cpp [root@localhost demo]# ./test hello world
标签:using vim c++ color NPU localhost error: 工作 director
原文地址:https://www.cnblogs.com/the-wang/p/12100252.html