You need to include <string> and specify the namespace:
#include\#include <string> using namespace std;using namespace std; Also, your include guard should probably be named READPUNCHTWORDS_H rather than READWORDS_H.
Edit: On second thought, GMan is right about not putting using namespace in a header file - qualify the string with std::string instead.