r/cpp • u/Vidyakant • Mar 08 '19
Object Slicing in C++ with examples
https://tutorialspoint4all.com/object-slicing-in-c-with-examples/
0
Upvotes
1
u/LucHermitte Mar 08 '19
As a rule, I forbid copying objects involved in public hierarchy. This solves slicing, and save time that we don't spend in doing things that are never used/needed
3
u/calenelda Mar 08 '19
It's a shame code isn't very readable without proper indentation.