MinGW64的使用
1、测试编译C++
测试文件test.cpp,代码如下(下面为C代码,只是使用G++来编译而已)
#include <stdio.h> int main() { printf("Hello World!"); return 0; }
2、编译test
编译命令如下:
g++ test.cpp -o test
输出结果为:test.exe
3、执行
输入test回车,结果如下:
测试文件test.cpp,代码如下(下面为C代码,只是使用G++来编译而已)
#include <stdio.h> int main() { printf("Hello World!"); return 0; }
编译命令如下:
g++ test.cpp -o test
输出结果为:test.exe
输入test回车,结果如下: