#include <iostream>
#include <windows.h>
usingnamespace std;
class car
{
public:
int color;
int tires;
int minspeed;
int maxspeed;
int hood;
int door;
int window;
protected:
int engine;
}
class hood
{
public:
void up();
void down();
void unlock();
void lock();
protected:
void change();
}
class door
{
public:
void open();
void close();
void lock();
void unlock();
}
class window
{
public:
void rollup();
void rolldown();
}
class engine
{
public:
void start();
void stop();
protected:
int overheat;
int cooldown;
void car::engine()
{ //line 55
engine.car::engine()start
cout << "Car Started";
} //line 58
my compiler gives me 4 errors:
-invalid member funtion declaration (line 55)
-expected '}' at end of input (line 58)
-expected unqualified-id at end of input (line 58)
-expected ',' or ';' at end of input (line 58)
problem is, whatever I do it doesn't help.
please help me and tell me what is wrong with this car class program.
(not yet finished btw)
I'm using the C++ compiler from Bloodshed Dev C++ 4.9.9.2