Jumat, 30 September 2016

What is object slicing in c++

Object Slicing   In inheritance we can assign a derived class object to a base class object. But, a base class object cannot be assigned to a derived class object. When a derived class object is assigned to a base class object, extra features provided by the derived class will not be available. Such phenomenon is called object slicing.   Following program demonstrates object slicing: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

The post What is object slicing in c++ appeared first on Coding Security.


What is object slicing in c++
read more

Tidak ada komentar:

Posting Komentar