1.在vsc中的setting.json 中找到code-runner.executorMap
2.代码替换
//对于C文件
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && clear && Write-Host \"[Running $fileName]\" -ForegroundColor green && $dir$fileNameWithoutExt && Write-Host \"\n[Accomplished]\" -ForegroundColor green",
//对于C++文件
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && clear && Write-Host \"[Running $fileName]\" -ForegroundColor green && $dir$fileNameWithoutExt && Write-Host \"\n[Accomplished]\" -ForegroundColor green",