My base class (State.h):
#pragma once
#include <Windows.h>
#define WIN32_LEAN_AND_MEAN
#include <gl\GL.h>
#include <gl\GLU.h>
#include "StateManager.h"
class State
{
public:
virtual ~State();
virtual void update(double dt){}
virtual void render(){}
};
The derived class(State_Test.h):
#pragma once
#include "State.h"
class State_Test : public State
{
public:
State_Test();
~State_Test();
};
The errors it gives are in a different class (StateManager.h):
#pragma once
#include "State.h"
#include <map>
#include <string>
class StateManager
{
public:
StateManager();
~StateManager();
std::map<std::string, State *> m_StateMap;//error C2976: 'std::map' : too few template arguments | error C2065: 'State' : undeclared identifier | error C2059: syntax error: '>'
std::string m_CurrentState;
void AddState(std::string stateId, State *state);//error C2061: syntax error : identifier 'State'
void ChangeState(std::string stateId);
};
Also there's this warning:
Warning 5 warning C4005: '_malloca' : macro redefinition c:\program files (x86)\microsoft visual studio 12.0\vc\include\crtdbg.h 586 1
Syntactically it looks correct, VS doesn't underline anything, and this code had worked before without error. I'm just wondering if anybody has seen this error before or knows what the cause of it is?