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

When should you use global variables?

1144


What are the uses of static class data?

1118


What are the advantages of c++ over c?

1010


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

944


Write about the local class and mention its use?

1012


What are smart pointers?

2159


How does code-bloating occur in c++?

1131


How the delete operator differs from the delete[]operator?

1048


What do you mean by persistent and non persistent objects?

1353


Is c++ still being used?

964


How do I get good at c++ programming?

1081


List the advantages of inheritance.

1057


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1157


What is pure virtual function? Or what is abstract class?

1002


Explain the difference between static and dynamic binding of functions?

995