Nov 12, 2014 at 12:51pm UTC
asdadqesad
Last edited on Nov 25, 2014 at 1:05am UTC
Nov 12, 2014 at 12:54pm UTC
adsadasdasd
Last edited on Nov 25, 2014 at 1:06am UTC
Nov 12, 2014 at 3:54pm UTC
'Car' should be a child class of 'Vehicle'. This is done outside of main().
Last edited on Nov 12, 2014 at 3:54pm UTC
Nov 13, 2014 at 12:12pm UTC
sadsadasdasdasd
}
Last edited on Nov 25, 2014 at 1:06am UTC
Nov 13, 2014 at 12:14pm UTC
but the problem here is,i dont know how to call the car class bcuz the car class has the platenumber variable...i dont know how to call both parent and child into main.Pls help me anyone..thanks in advance
Nov 13, 2014 at 1:04pm UTC
Consult your favorite C++ book on inheritance.
If car inherits 'public' from vehicle, you can call all public methods of vehicle on an instance of car, since it IS an instance of vehicle as well.
Bonus hint: inside the display() method of car you could call the display() method of vehicle.
Nov 15, 2014 at 2:07am UTC
sadsadsad
Last edited on Nov 25, 2014 at 1:06am UTC