gcc -o swap.exe swap.c -std=c99 -g g++ -o swap.exe swap.cpp -std=c++11 -g 加上-g 选项,会保留代码的文字信息,便于调试下面两幅图是有无 -g 选项调试的区别