Hi All,
Please find the below code and please elaborate how derived class default copy constructor is calling base class copy constructor which is implemented by the base class.
class X
{
X( const X& x );
}
class Y ; public X
{
}
class Z
{
void fun( )
{
Y y1;
Y y2 = y1;
}
}
At the expression Y y2 = y1; it is calling X( const X& x ) ( meanse from Y's default copy constructor Base class Implemented Copy constructor. I thought of it will call Base class's default copy constructor. Can you please how this is happening.
Many Thanks
Nari