Cannot Declare Abstract Variable errors

Last edited on
You cannot define the same class twice. When you implement the member functions in a source file, instead of putting the function definitions in the class body, you have to prefix the function names with the class name (Class::function).

How you have it now:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class ParkingLot
{
public:
	ParkingLot()
	{
		...
	}
	
	void ParkVehicle(Vehicle _v, ParkingSpace& _ps, std::string ps)
	{
		....
	}
	
	...
};

How you should write it:
1
2
3
4
5
6
7
8
9
10
11
ParkingLot::ParkingLot()
{
	...
}

void ParkingLot::ParkVehicle(Vehicle _v, ParkingSpace& _ps, std::string ps)
{
	....
}

...
Last edited on
Topic archived. No new replies allowed.