在VS2008中,未能理解 . 或 ->

来源:互联网 发布:矩阵diag 编辑:程序博客网 时间:2024/06/08 06:04

 好好的项目突然智能类对象和指针智能感知失效,参考了多方资料及MSDN:

To approach IntelliSense failure in C++ projects

  1. Make sure your Visual C++ project contains no compilation errors.

    1. If your project is a Makefile project, see How to: Enable IntelliSense for Makefile Projects.

  2. Make sure that stdafx.h is in the include path. For more information about include paths in Visual C++ projects, see #include and /I.

  3. 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.

  4. If none of the preceding steps help resolve IntelliSense failure, then there might be an error in the .ncb file for your solution.

    1. 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).

    2. Regenerate the .ncb file for your solution.

To regenerate .ncb files

  1. Delete the .ncb file from your solution. //删除.ncb文件后问题得以解决

  2. Rebuild your solution.//重新生成

The development environment automatically regenerates a new .ncb file for your solution.