I suspect this is a very minor issue, but I have spent several hours trying to fix it and have not found anything.
In Game.h (a header file), I have the following:
#pragma once
#include "PlayEngine.h"
class Game {
public:
int Init();
int Run();
int Shutdown();
private:
enum State { ST_MENU, ST_PLAYING } state;
PlayEngine* playengine_;
};
The compiler throws a syntax error on PlayEngine* playengine_, complaining that there is a missing ; before the *. PlayEngine is a class I have defined in other places.
What am I missing?
Replace
with
A declaration is enough for this case. (and I’m betting the source is a circular inclusion)