vscode c++ 报identifier “string” is undefined
问题
- 新装了电脑, 装好vsc和g++等, 发现报错

- 但开头并没问题

解决
shift+ctrl+p- 选择
C/C++ Edit:COnfigurations (JSON) - 自动生成打开
c_cpp_properties.json - 添加g++路径等
"cStandard": "c11","cppStandard": "c++11","compilerPath": "D:\\Code\\MinGW\\mingw64\\bin\\g++.exe"

5. 报错消失了
一键搞定 VSCode 下的 C/C++基本开发环境配置