I'm getting a error message when I try to compile my program[
C:\Documents and Settings\Warren Hoskins\My Documents\C++ programs in progress>c
l /EHsc "vehicle".cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
vehicle.cpp
c:\Documents and Settings\Warren Hoskins\My Documents\C++ programs in progress\P
erson.h(7) : error C2011: 'Person' : 'class' type redefinition
vehicle.cpp(7) : see declaration of 'Person'
This is the code
//#ifndef VEHICLE_H
//#define VEHICLE_H
#include <iostream>
#include <string>
//#include "person.h"
using namespace std;
class Vehicle : public Person
{
public:
Vehicle();
Vehicle(string, int, Person);
string getManufacturer(){return manufacturer;}
int getCylinders(){return cylinders;}
string getOwner(){return vehicleOwner.getName();}
protected:
string manufacturer;
int cylinders;
Person vehicleOwner;
};
#include <string>
#include <cstdlib>
#include <iostream>
//#include "vehicle.h"
using namespace std;
Vehicle::Vehicle() :Person(), manufacturer("NoName"), cylinders(4)
{
}
Vehicle::Vehicle(string m, int c, Person o)
{
manufacturer = m;
cylinders = c;
vehicleOwner = o;
};