本文共 372 字,大约阅读时间需要 1 分钟。
使用vim或sublime编写测试cpp文件test.cpp
例:
#includeusing namespace std;int main(){ int a; cin>>a; cout<
假设保存在Algorithm文件夹下
进入Algorithm文件夹
cd Algorithm
编译test.cpp并命名可执行文件为test_ttt
g++ -o test_ttt test.cpp
执行生成的文件
./test_ttt即可在终端输入,并输出结果了
---------------------------------------------------------------------------------------------
编译C文件:
gcc -o test_ttt test.c
转载地址:http://zwsqi.baihongyu.com/