I have a two classes :
class X is a base class
class XA is publicly derived from class X
when I create array of pointers of class X
then I change the type to XA object
XArray = new XA;
and try access read() function defined in XA class
I get a error message that :
In function 'int main()':
error: 'class X' has no member named 'read'
Why there is still function call to X::read() ?
Anyone have any idea what I'm doing wrong or what am I missing here?
compiler : gcc version 4.0.3 (Debian 4.0.3-1)