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
Which c++ operator cannot overload?
What is the use of namespace std in C++?
Explain virtual class and friend class.
How java is different from c and c++?
What is the use of setfill in c++?
What is expression parser in c++
What is the default access level?
What is an iterator?
write a function signature with various number of parameters.
Why do you use the namespace feature?
What is an undefined behavior and sequence points
List the issue that the auto_ptr object handles?
Explain terminate() function?
What is rtti in c++?
What are c++ tokens?