Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

object slicing

Former Member
0 Likes
551

HI,

what is object slicing?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
486

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.

2 REPLIES 2
Read only

Former Member
0 Likes
486

Hi

Object slicing is the BW related concept.

see the link

http://www.cubeserv.com/sapbwbibliothek/inhaltsverzeichnis_sapbw_datenmodellierung_en.html

Regards

Anji

Read only

Former Member
0 Likes
487

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.