Skip to main content
added 148 characters in body; added 42 characters in body
Source Link
interjay
  • 111k
  • 22
  • 278
  • 264

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.

You need to include <string> and specify the namespace:

#include <string> using namespace std; 
 

Also, your include guard should probably be named READPUNCHTWORDS_H rather than READWORDS_H.

You need to include <string> and specify the namespace:

\#include <string> 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.

Source Link
interjay
  • 111k
  • 22
  • 278
  • 264

You need to include <string> and specify the namespace:

#include <string> using namespace std; 

Also, your include guard should probably be named READPUNCHTWORDS_H rather than READWORDS_H.