I'm killing time before class and I've hit a problem with my console rpg. I declare a class player_t in file player.h:
and I get these weird errors:Code:#ifndef PLAYER_H #define PLAYER_H #include "map.h" class player_t { private: int x, y, hp, *numitems; public: player_t(map_t&); ~player_t(); }; #endif
I've gone through the code and I'm not missing a } or anything obvious, does anyone know what's wrong here or how I can fix it?h:\rpg\rpg\player.h(10) : error C2629: unexpected 'class player_t ('
h:\rpg\rpg\player.h(10) : error C2238: unexpected token(s) preceding ';'