Watch does not display derived class variables 
Author Message
 Watch does not display derived class variables

Can anyone explain why the watch window will not display derived class data
when clicking on the derived class "+" box?  Does it have anything to do with
casting?  Here's an example:

        BaseClass *array[10];
        DerivedClass myClass

        myClass = new DerivedClass();

        array[0] = myClass;

If during the debug session, after the last statement, I click on the watch
window to display what is in array[0], I get the BaseClass data "AND" the
DerivedClass with a "+" box next to it.  When I click on the box, I just get
the same base class data repeated again.  Any ideas?  Am I violating some C++
pointer rule?  Thanks

Bob Z

Sat, 25 Nov 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. CFormView derive class - deciding not to display the view after all

2. Derived Interface implemented in derived class not found

3. Variable data not showing in watch windows

4. can not watch local Variables in debuger

5. Classview not showing classes derived from classes in user namespace

6. Creating a DLL in MFC to store a class not derived from an MFC class

7. New Class derived from Class which derived from CWindowImpl

8. Activating the class wizard on a derived-derived Cwnd class

9. How to Create CCtrlView derived class based on CTreeCtrl derived class

10. How to Create CCtrlView derived class based on CTreeCtrl derived class

11. Variables in Variables / Watch window

12. Class Wizard not displaying all classes


Powered by phpBB® Forum Software