'lo there folks,
MinGW's giving me 1 error I can't get rid of:
eventhandler.h|9|error: `element' has not been declared|
eventhandler.h|9|error: ISO C++ forbids declaration of `elem' with no type|
All code mentioned and I think needed:
eventhandler.h
#ifndef EVENTHANDLERH
#define EVENTHANDLERH
#include "element.h"
enum events {onClick, onHover};
typedef struct eventHandlerT {
void(*func)(element *elem);
events eventType;
} eventHandler;
#endif // EVENTHANDLERH
element.h
#ifndef ELEMETH
#define ELEMETH
#include "eventhandler.h"
class element {
public:
element();
~element();
void processEvent(events event);
vector<eventHandler> handlers;
unsigned int ID;
static unsigned int IDcount;
};
#endif // ELEMETH
Why is element not declared? I don't get that, the header is included right above it?
Any help is greatly appreciated,