First time on this forum, guys from the SDL mailing list gave me the tip
I´m having a problem with the 2D graphics game engine I´m developing. I´m
doing the event management system right now and decided that I should create a class named EventHandler that has a pure virtual function named
HandleEvent. This function is the one that, obviously, handles inputs and
any other ocurrencies differently depending on the element of the game we
are talking about, like a sprite, a tile, or, talking high-level, items,
characters and so on.
Many classes must inherit from EventHandler so they are obliged to implement
HandleEvent() and can be all referenced on a single vector that I will use
later to check some things out.
BUT the problem is: I have every class on a header file, and its function
codes on a correspondent .cpp file. So each of these header files supposedly
must include my 'eventHandler.h', causing multiple referencing. And I can´t
just use forward referencing to EventHandler, because of the inheritance.
What do I do? I´m using Dev-C++, and all my header files have those #ifndef
#define #endif directives.
Thanks in advance,