Vehicle v; mileage
model
returnDate
Car c;
mileage |
model |
returnDate |
category |
Vehicle* vPtr=&c; | |||
mileage |
model |
returnDate |
vPtr cannot see the category data |
Car* cPtr=(Car*)&v; | |||
mileage |
model |
returnDate |
category is undetined -appears as garbage to cPtr |