Intellisense in vs2010 with c++

后端 未结 12 1808
遇见更好的自我
遇见更好的自我 2021-01-13 13:38

I can\'t get intellisense to work. Even if I start with an empty project and add just one file to it with only an include for iostream and an int main()

相关标签:
12条回答
  • 2021-01-13 14:14

    Just throwing this out there, you are using namespace std? eg:

    std::cout.
    

    because intellisense wont work if it doesn't see cout

    edit: I over looked that error message so this isn't the case but leaving the answer in case it might help someone down the line.

    0 讨论(0)
  • 2021-01-13 14:20

    Do you use the /UseEnv switch when opening visual studio? It breaks Intellisense for c++ projects.

    0 讨论(0)
  • 2021-01-13 14:24

    Look at this question :C++ VS Express 2010 Intellisense

    It was solved by pressing CTRL+J .

    EDIT: maybe it's the stdafx.h problem !

    Add a file stdafx.cpp and a file stdafx.h to the project ! Use #include "stdafx.h" as yhe first line of code in all your .cpp files. Include all rarely/never changing and frequently used header-files in stdafx.h. Turn on precompiler-headers in your project and rebuild the project.

    (Create a dummy project which have precompiled headers on to see how it's been done)

    0 讨论(0)
  • 2021-01-13 14:25

    Maybe it never got installed, have you tried a repair install?, it's worth a shot..

    0 讨论(0)
  • 2021-01-13 14:26

    baruch's answer worked for me. for completion, here is also the link to the VS2010-SP1: http://www.microsoft.com/en-us/download/details.aspx?id=23691

    so first installing this and then the hot-fix that baruch referred to solved me the problem, although the whole installation took almost 1:30 hour! (including one restart on my Win-XP machine.)

    0 讨论(0)
  • 2021-01-13 14:27

    I know this is an old question, but I had a similar problem IntelliSense: 'No additional information available' (See 'Troubleshooting IntelliSense in C++ Projects' for further help.). My problem wasn't related with stdafx.h.

    To solve my problem, I closed VS2010, deleted the .sdf and .suo files as well as the ipch directory inside the project's main folder.

    Then I restarted VS2010, waited for it to build all its metadata again and Intellisense (autocompletion) worked nicely.

    EDIT: I am not aware if this "maneuver" has negative side effects.

    0 讨论(0)
提交回复
热议问题