EDIT: Looks like I missed some includes, no more error for the SharedContext. But now I have another bunch of errors I will try to correct them first before posting themHello
I have an issue in Chapter 7 regarding the header of the class "Map".
When I try to build the code, there is an error here:
struct TileInfo {
/// C-tor & D-tor ///
TileInfo(SharedContext* context, const std::string &texture = "", TileId id = 0)
[...]Map.hpp|17|error: expected ')' before '*' token|
So it seems there is a problem with the "SharedContext *" parameter. The SharedContext header should be good:
class Map;
struct SharedContext
{
SharedContext():
mWindow(nullptr)
, mEventManager(nullptr)
, mTextureManager(nullptr)
, mEntityManager(nullptr)
, mGameMap(nullptr)
{}
Window *mWindow;
EventManager *mEventManager;
TextureManager *mTextureManager;
EntityManager *mEntityManager;
Map *mGameMap;
};
I read somewhere in previous answers that
SharedContext *
member in StateManager.hpp should be
SharedContext
but it doesn't seem to resolve the problem