class Base { int x, y; }; class Derived : public Base { int z, w; }; int main() { Derived d; Base b = d; // Object Slicing, z and w of d are sliced off } # This can be prevented by using pointers.