vscode中编写c++程序
会生成两个文件:settings.json和tasks.json。
settings.json
{"C_Cpp.default.compilerPath": "e:\\softinstall\\CodeBlocks\\MinGW\\bin\\c++.exe","files.associations": {"iostream": "cpp"}
}
tasks.json
{"tasks": [{"type": "cppbuild","label": "C/C++: c++.exe 生成活动文件","command": "e:\\softinstall\\CodeBlocks\\MinGW\\bin\\c++.exe","args": ["-fdiagnostics-color=always","-g","${file}","-o","${fileDirname}\\${fileBasenameNoExtension}.exe","-lgdi32","-lwinmm"],"options": {"cwd": "e:\\softinstall\\CodeBlocks\\MinGW\\bin"},"problemMatcher": ["$gcc"],"group": {"kind": "build","isDefault": true},"detail": "调试器生成的任务。"}],"version": "2.0.0"
}
指定对应的库: