在使用VC++2005自建C++项目的时候常常会遇到语法提示不能出来的问题。 在状态条会出现下面的提示:Troubleshooting IntelliSense in C++ Projects
IntelliSense can stop working under certain conditions. Use the following procedure to help determine why IntelliSense does not work for your C++ projects.
To approach IntelliSense failure in C++ projects
-
Make sure your Visual C++ project contains no compilation errors.
-
If your project is a Makefile project, see How to: Enable IntelliSense for Makefile Projects.
-
-
Make sure that stdafx.h is in the include path. For more information about include paths in Visual C++ projects, see #include and /I.
-
If your solution contains a combination of the Managed Extensions for C++ and the new syntax for managed C++, then separate your solution into multiple solutions based on the syntax type.
-
If none of the preceding steps help resolve IntelliSense failure, then there might be an error in the .ncb file for your solution.
-
Copy the .ncb file and contact product support services. For more information about how to contact Microsoft for technical support, see Getting Help from Microsoft Product Support Services (Visual Studio).
-
Regenerate the .ncb file for your solution.
-
To regenerate .ncb files
-
Delete the .ncb file from your solution.
-
Rebuild your solution.
The development environment automatically regenerates a new .ncb file for your solution.

-
The cursor is inside a code comment.
-
You are writing a string literal.
-
A syntax error appears above the cursor.
-
IntelliSense is not fully supported under the following circumstances:
-
When you reference a header file multiple times using the #include directive, and the meaning of that header file changes due to various macro states (which are defined through the #define directive). In other words, when you include a header file several times whose usage changes under different macro states, IntelliSense will not always work.
IntelliSense does not work in C++ projects under the following circumstances: