Hey Everyone, first time posting, long time reader.
I'm attempting to challenge myself and create a program for my own practice in c++ which would have a Vehicle class, which inherits a car and a truck class. Furthermore, there are separate classes such as: Window class, door class, engine class, tire class which would all have to coordinate with the car or truck class. First time attempting this so I am having a lot of trouble - don't understand how I could for example use the inflate function in the tire class on 1 tire inside the car class. Ill post the code I have so far - I'm wondering why none of these lines would work:
car.tire[0].inflate(10);
car.right.close();
car.left.window.rollup();
car.engine.start();