Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is object slicing and how can we prevent it?

Answer Posted / vikas

Object slicing occurs when we assign an instance of the
subclass to a variable of type base class.

http://www.cppquestions.com/viewtopic.php?f=17&t=49

Is This Answer Correct ?    12 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of setfill in c++?

1074


Is c++ a dying language?

1150


What are c++ stream classes?

1048


What are the defining traits of an object-oriented language?

1206


Explain selection sorting. Also write an example.

1047


Incase of a function declaration, what is extern means?

974


How is static data member similar to a global variable?

1121


Can we get the value of ios format flags?

1139


Array base access faster or pointer base access is faster?

2305


What is the use of function pointer?

1027


What is virtual table?

1119


Give 10 points of differences between C & C++.

1142


What are the two types of comments, and how do they differ?

1136


What is the best c++ book?

1268


What is the use of seekg in c++?

1056