I am getting flustrated with two errors and I have absolutely no idea what is wrong.
#ifndef ListElements
#define ListElements
#include "RentalObjects.h"
struct RentalList{
ObjectBase* content;
RentalList* Next;
};
#endif
All the time I get this error:
Error 1 error C2143: syntax error : missing ';' before '*'
Error 2 error C4430: missing type specifier - int assumed.
The RentalObjects.h file features a declaration of the ObjectBase class, which looks as follows:
class ObjectBase{
protected:
char Make[16];
char Model[16];
int Year;
float PricePerDay;
Booking* Availability;
public:
void SetMake(char* value);
void SetModel(char* value);
void SetYear(int value);
void SetPrice(float value);
bool DisposeBookings();
bool Book(int Start,int End);
char* GetMake();
char* GetModel();
int GetYear();
float GetPrice();
~ObjectBase();
};
I'd be grateful for a tip.
;at the end of one of a class definition (or somewhere else) inside RentalObjects.h, or otherwise caused ObjectBase to be undeclared due to a syntax errorRentalObjects.h? does it have include guards? does it include something else? maby recursive includes?Booking. Is there a declaration for it?