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
What is the keyword auto for?
Is ca high or low level language?
What programming language should I learn first?
What is object in c++ wikipedia?
What's c++ used for?
What are the advantages of c++ over c?
Differentiate between realloc() and free().
In c++, what is the difference between method overloading and method overriding?
What is a rooted hierarchy?
Write about the access privileges in c++ and also mention about its default access level?
What is istream c++?
What is a class definition?
What is endl?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Should the this pointer can be used in the constructor?