Why is visual studio code telling me that cout is not a member of std namespace?
Its a bug.
There is a workaround for this bug, go to File -> Preferences -> Settings
in VS Code and change
"C_Cpp.intelliSenseEngine": "Default"
to "C_Cpp.intelliSenseEngine": "Tag Parser"
I am using VSCode version 1.22.2 with MinGW compiler and below config works for me:
{
"configurations": [
{
"name": "MinGW",
"intelliSenseMode": "clang-x64",
"compilerPath": "C:/MinGW/bin/g++.exe",
"includePath": [
"${workspaceRoot}",
],
"defines": [
"_DEBUG"
],
"browse": {
"path": [
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
"C:/MinGW/include/*"
"${workspaceRoot}",
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 3
}
Refer these link too: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md
https://code.visualstudio.com/docs/languages/cpp