I have a file, in which I include a header file. However on compilation I am getting lots of was not declared in this scope
errors, which is odd as I declare/include everything I need in the header file. Here is the header file
#ifndef INPUT_H
#define INPUT_H
#include <map>
#include <functional>
#include <SDL/SDL.h>
using namespace std;
multimap <SDL_EventType, function<void(SDL_Event&)>> functions;
template <typename T>
void registerInput(SDL_EventType type, T&& functionPointer);
#endif
And here is the source file:
#include "input.h"
template <typename T>
void registerInput(SDL_EventType type, T&& functionPointer){
functions.insert(pair<SDL_EventType, function<void(SDL_Event&)> >(type, functionPointer));
}
The compile error:
input.cpp:3:20: error: ‘SDL_EventType’ was not declared in this scope.
What am I doing wrong?