BUG: ClassView Lacks "Go to Declaration" for Static Data MembersLast reviewed: January 8, 1998Article ID: Q179012 |
The information in this article applies to:
SYMPTOMSClassView's context menu offers both "Go to Declaration" and "Go to Definition" options for class member functions. However, class data members with the "static" attribute have only the "Go to Definition" option.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONConsider the following class, presented for illustration only:
// Class Definition class MyClass { public: // Data members static int i; char c; // Function members MyClass(); }; // Class Declarations int MyClass::i = 0; MyClass::MyClass() { c = 0; }Each instance of "MyClass" contains the normal data member "c". Such members are normally initialized in the class's constructor. In Visual C++'s ClassView pane, the menu resulting from right-clicking on MyClass member "c" correctly indicates that it has no implementation (or declaration). However, a static data member, such as "i" in the example, requires an explicit declaration outside of the class definition. ClassView does not offer an option for jumping directly to such a declaration.
Steps to Reproduce Behavior
WorkaroundThe following is a suggested workaround:
REFERENCES"Language Quick Reference – static," VC++ 5.0 online books.
Keywords : kbcode Version : WINNT:5.0 Platform : winnt Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |