‎2008 Feb 22 4:12 AM
‎2008 Feb 22 5:52 AM
HI,
When a Derived Class object is assigned to Base class, the
base class' contents in the derived object are copied to
the base class leaving behind the derived class specific
contents. This is referred as Object Slicing.
Class Base
;
class Derived : public Base
;
int main()
{
Base Bobj;
Derived Dobj;
Bobj = Dobj; //Here Dobj contains both i and j.
//But only i is copied to Bobj.
}
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
‎2008 Feb 22 4:16 AM
Hi
Object slicing is the BW related concept.
see the link
http://www.cubeserv.com/sapbwbibliothek/inhaltsverzeichnis_sapbw_datenmodellierung_en.html
Regards
Anji
‎2008 Feb 22 5:52 AM
HI,
When a Derived Class object is assigned to Base class, the
base class' contents in the derived object are copied to
the base class leaving behind the derived class specific
contents. This is referred as Object Slicing.
Class Base
;
class Derived : public Base
;
int main()
{
Base Bobj;
Derived Dobj;
Bobj = Dobj; //Here Dobj contains both i and j.
//But only i is copied to Bobj.
}
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.