Class Redefinition

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
#include<iostream>
using namespace std;

class Vehicle
{
    int position;
public:

    virtual void setV(int pos)
    {
        position = pos;
    }

    virtual int get()
    {
        return position;
    }

    virtual void display(int pos)
    {

        cout<<"vehicle";
    }
};


im having a hard time compiling this:

List of error:

Error 1 error C2011: 'Vehicle' : 'class' type redefinition c:\users\mllroal\desktop\topice\vehicle.h 5 1 ConsoleApplication1

\
Any suggestion?
Topic archived. No new replies allowed.