Base class/Derived class
807591May 7 2008 — edited May 9 2008Hi all,
I have
class Base {
int a;
}
class Derived{
int b;
}
now if i do
Base X = new Base();
Derived D = new Derived();
It Doesn't allow me to do D=X
But it does allow me to do X=D.
whats the reason behind it. And what actually happens when i do X=D , does the copy constructor gets called ?
Thanx