Header File Problems

I have the following code for a header file . . .

1
2
3
4
5
6
7
8
9
10
11
12
13
class player {
 private:
  std::string file;
  std::string line;
  int positions;
  int positionf;
  std::string room;
  std::string zone;
  int length;
  std::fstream myfile;
 public:
  std::string GetRoom(std::string);
};


When I compile the program I get the following error.

player.h:12: error: 'string' does not name a type

The error remains the same if I remove one or both of the std designators on line 12.

I am using g++ on a macbook pro running the latest version of os 10.7 and Xcode.
Are you including string?
Topic archived. No new replies allowed.