Cannot Declare Abstract Variable errors

Mar 3, 2019 at 3:10am
Last edited on Mar 5, 2019 at 6:42am
Mar 3, 2019 at 8:33am
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 Mar 3, 2019 at 8:33am
Topic archived. No new replies allowed.