
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