problem occurs
When writing C++ in vscode, I saw an error
The C++ keyword shows that it is not defined. If you think about it carefully, you will know that this is definitely impossible.
Try to compile it and there is no problem, indicating that there is a problem with vscode
Solve the problem
Open the user settings file of vscode File-
>Preferences->Settings
Enter the following settings inside the curly brackets in the right column
"args": ["-g","-Wall","-std=c++11","${file}","-o","${file}.exe"],
Jiang ~ problem solved