0

How the C++ polimorphism work with pointers?

if I declare a pointer of A, he point to memory for A size. but if the pointer point to B object, who is inherite from A, the size of memory should be bigger?

17th Mar 2017, 3:12 PM
‫ברוך רוטקוף‬‎
‫ברוך רוטקוף‬‎ - avatar
1 Answer
0
Yes, but actually, you shouldn't take care about it. Just use the pointers and compiler will do its work. All pointers themselves have the same size.
30th Mar 2017, 10:41 PM
soman