Skip to content

Glossary: C++ Beyond the Basics

Object slicing

Also written: slicing

Copying a derived object into a base object by value, which keeps only the base part. Pass `const Discount&` or use pointers to avoid it.

Where the book teaches it

Related terms

Base classBy value