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, and it jumps incorrectly to the variable's declaration inside the class definition. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++, version 6.0. MORE INFORMATIONConsider the following class, presented for illustration only:
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
definition). However, a static data member, such as "i" in the example,
requires an explicit definition in addition to its declaration inside the
class definition. ClassView's option does not jump directly to such a
definition.Due to a bug in Visual C++ 6.0, clicking "Go To Definition" for a template class static member variable displays the following error message: For additional information, please see the following article in the Microsoft Knowledge Base: Q154112 ClassView Cannot Find Template Member Function Definition Steps to Reproduce Behavior
WorkaroundThe following is a suggested workaround:
REFERENCES"Language Quick Reference [ASCII 150] static," VC++ 5.0 Online Books. Additional query words:
Keywords : kbcode kbVC500bug kbVC600fix kbGrpDSTools |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |