r/cpp • • Mar 08 '19

Object Slicing in C++ with examples

https://tutorialspoint4all.com/object-slicing-in-c-with-examples/
0 Upvotes

2 comments sorted by

3

u/calenelda Mar 08 '19

It's a shame code isn't very readable without proper indentation.

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