.cpp文件的组合框Scopes和Function in Scope在VS2008 sp2中不起作用.知道为什么这些组合

The combo boxes Scopes and Function in Scope, for a .cpp file are not working in VS2008 sp2. Any idea why these combo boxes are not working?

本文关键字:组合 不起作用 sp2 为什么 VS2008 Scope 文件 Scopes cpp in Function      更新时间:2023-10-16

.cpp文件编译正常,但Scopes组合框只显示该文件中存在的50多个类和结构中的3个。Functions in Scope组合框不显示这3个类的任何内容。

我在另一个项目(相同的解决方案)中有一个不同版本的相同.cpp文件,其中两个组合框都能完美工作。

有人知道问题出在哪里吗?

编辑:对于我用鼠标左键单击的绝大多数类成员函数,Scope combo box一直显示"未知范围"。

第1版:这是我面临的两个组合框问题的一个非常简化的版本:

class A
{
    int i;
    public:
    A();
    A(int);
    A(short);
};
//  VS2008 -    If I click with the left mouse button in between the brackets below I get
//              in the 2 combo boxes boxes the following results : 
A::A() : i(10) {}           //  A and A()
A::A(short s) : i(s) {}     //  A and A(short)
A::A(int k) : i(k) {}       //  (Unknown Scope)
//  Why the unknown scope ?

第3版:这是VS2008中的一个错误。在VS210中不会发生这种情况

Intellisense并不是Visual Studio for C++中最稳定的功能。。。

您可以尝试删除项目的.ncb文件(该文件与项目的.sln文件同名),该文件包含intellisense数据库。当它丢失时,VS从头开始重建它,一切都应该恢复正常。

这是VS2008中的一个错误。VS2010不再有!!