
September 1st, 2012, 01:06 AM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Are you sure you understand how to construct an object in C++? car_status() is not a constructor, so you can't arbitrarily call new on it. Also, if you have a Vehicle* object, you can't invoke car_status() on it because the Vehicle class doesn't have that method.
I think you need to take a step back and understand how to construct a basic C++ object before you even try to write any polymorphic stuff.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|