编好程序后,先ctrl+s保存,ctrl+j召唤终端,在终端输入 g++ 文件名.文件类型 -o 文件名 -o2 再输入 ./文件名 就能运行程序。如 g++ test.cpp -o test -o2 ./test 能运行文件test.cpp