I have two classes: Game and inputs. Game class has a constructor that takes no variables, while inputs class takes pointer to Game object as an argument (or at least is supposed to).
In main I create two instances of thes objects:
Game main_game;
inputs main_inputs(&main_game);
And that is the troublesome part of inputs.h:
class inputs{
public:
Game *wsk;
inputs(Game *);
};
The compiler gives me two errors in inputs.h:
1) 'Game' does not name a type 2) expected ')' before '*' token
What am I doing wrong, trying to pass adress of Game object to inputs constructor?
#includethe header with the definition ofGameor provide a forward-declaration and do that in the .cpp file.