Did you #include <string> and specify the std namespace in Player.h? If not, you should have because you use string inside that file.