1、下载Code Runner。
2、按顺序点击
3、点击“在setting.json中编辑”
4、修改下面两个位置:
"c": "cd $dir && gcc *.c -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"cpp": "cd $dir && g++ *.cpp -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
5、点击tasks.json,修改"${file}", 为: "*.c"
6、保存后就可以编译了。