Microsoft KB Archive/205402

= FIX: ClassView Doesn't Show Derived Classes in Embedded Namespace =

Article ID: 205402

Article Last Modified on 10/24/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition

-



This article was previously published under Q205402



SYMPTOMS
The ClassView pane doesn't display a class that is in an embedded namespace if it inherits from another class that is defined in the outer namespace.



RESOLUTION
Use a typedef statement to create an alias for the class name in the outer namespace, and then derive from it.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual C++ 6.0.



Steps to Reproduce Behavior
Add the following code to a C++ source or header file: namespace A { class ClassA {  public: ClassA {} };

// Create an alias for the outer class. typedef A::ClassA A_ClassA;

namespace B  { // This class is not displayed in ClassView. class ClassB1 : public A::ClassA {     public: ClassB1 {} };

// This class is displayed in ClassView. class ClassB2 : public A_ClassA {     public: ClassB2 {} };  } // namespace B } // namespace A

Keywords: kbbug kbfix kbide kbvc600fix kbclassview KB205402

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.