title: C++ g++ can't find 'string' type in class header file
body: <p>I'm new to C++ but I can't figure out why this won't compile for me. I'm running on a Mac, coding with Xcode, but I'm building with my own makefile from bash.</p>
  
  <p>Anyway, I'm getting two compiler errors that "string" type can't be found, even though I've included . Any help would be welcomed. Code:</p>
  
  <pre><code>//#include &lt;string&gt; // I've tried it here, too. I'm foggy on include semantics, but I think it should be safe inside the current preprocessor "branch"
  #ifndef APPCONTROLLER_H
  #define APPCONTROLLER_H
  
  #include &lt;string&gt;
  class AppController {
  // etc.
  public:
      int processInputEvents(string input); //error: ‘string’ has not been declared
      string prompt(); //error: ‘string’ does not name a type
  };
  #endif
  </code></pre>
  
  <p>I include this file in my main.cpp, and elsewhere in main I use the <code>string</code> type and it works just fine. Though in main I have included <code>iostream</code> instead of <code>string</code> (for other purposes). Yes, I've also tried including iostream in my AppController class but it didn't solve anything (I didn't really expect it to, either).</p>
  
  <p>So I'm not really sure what the problem is. Any ideas?</p>