LearnSomeMore
LearnSomeMore

Reputation: 490

VS Code C++ extension gives error "namespace has no member function"

I am using VS Code on Ubuntu 16.10 and am working on a C++ project. I have been using it for a few days now, but just today the C++ extension was updated v0.11.1. After this upgrade a good portion of my main.cpp has red error squiggles under member functions. In the problems output from VS Code it says "namespace std has no member endl". It says that over and over for different members such as endl, cout, etc.

C++ extension changelog: https://marketplace.visualstudio.com/items/ms-vscode.cpptools/changelog

How can I get VS Code to recognize the members? When I compile from the terminal using g++ I don't receive any errors.

Things I've tried:

Upvotes: 6

Views: 8850

Answers (1)

LearnSomeMore
LearnSomeMore

Reputation: 490

I was able to find a fix for this. It was due to the C++ extension update to v0.11.1.

On GitHub there was an issue reported. If anyone needs to fix this before they release a patch, go to File -> Preferences -> Settings in VS Code and change "C_Cpp.intelliSenseEngine": "Default" to "C_Cpp.intelliSenseEngine": "Tag Parser".

Upvotes: 16

Related Questions