This code was working just yesterday, but it broke today and I can't figure it out. Spent a lot of time setting up C++ last night and to have it not work on me right now is a bit frustrating; here's the code
/*
* PlayerEntity.h
*
* Created on: Jan 28, 2017
* Author: Jon
*/
#ifndef PLAYERENTITY_H_
#define PLAYERENTITY_H_
#include "GameEntity.h"
#include <map>
#include <utility>
class PlayerEntity: public GameEntity {
public:
PlayerEntity();
virtual ~PlayerEntity();
int size();
void grow();
private:
int length;
std::pair<int, int> head, tail, direction;
std::map<int, std::pair<int, int>> directions;
};
#endif /* PLAYERENTITY_H_ */
The error is this:
'map' in namespace 'std' does not name a template type
'pair' in namespace 'std' does not name a template type
Steps Taken - Include utility - Include map - Clean project
Aucun commentaire:
Enregistrer un commentaire