hello world的C++程序 (后缀.cpp)
起初出现错误:gcc 出现 cc1plus': execvp: 没有那个文件或目录 错误
网上搜索后发现应该使用:sudo apt-get install g++
还是错误:execvp: 没有那个文件或目录 错误
最后发现应该先使用:sudo apt-get install upgrade然后在安装g++
问题解决
g++ hello.cpp
./a.out
输出了:hello world!
不容易啊
hello world的C++程序 (后缀.cpp)
起初出现错误:gcc 出现 cc1plus': execvp: 没有那个文件或目录 错误
网上搜索后发现应该使用:sudo apt-get install g++
还是错误:execvp: 没有那个文件或目录 错误
最后发现应该先使用:sudo apt-get install upgrade然后在安装g++
问题解决
g++ hello.cpp
./a.out
输出了:hello world!
不容易啊