D x;
B* pb = &x
D* pd = &x;
Pb->mf() & pd->mf() will call different functions.
References exhibit the same baffling behavior as pointers above. I don't really understand this ??
Things to remember:
Never redefine an inherited non virtual function
No comments:
Post a Comment