title: Strings in C++ class file for Arduino not compiling
body: <p>I'm writing a stack class in C++ for an Arduino <a href="http://www.arduino.cc/en/Tutorial/Sketch" rel="nofollow">sketch</a>. I believe it is fully compliant with the AVR (if that's what it's called; I can't remember exactly) compiler; I've used all <code>malloc</code> and <code>free</code> instead of <code>new</code> and <code>delete</code> and so on.</p>
  
  <p>So I have a .h file with my class. I've imported it into the sketch, but when I try to compile, I get these errors:</p>
  
  <pre><code>In file included from sketch_may15a.cpp:1:
  /CStack.h:58:18: error: string: No such file or directory
  In file included from sketch_may15a.cpp:1:
  CStack.h:61: error: variable or field 'Error' declared void
  CStack.h:61: error: 'string' was not declared in this scope
  </code></pre>
  
  <p>And here are the first few lines for my class:</p>
  
  <pre><code>#include &lt;string&gt;
  using namespace std;
  void Error(string message) {
  </code></pre>
  
  <p>So the Arduino compiler can't find <code>&lt;string&gt;</code>, and the next few problems seem to relate to it (not sure what <code>variable or field Error declared void</code> means, my error function is just for debugging purposes).</p>
  
  <p>I know Arduino sketches support strings without need for an import, but I'm not sure how that works out with C/C++/.h files. I've tried googling it, but there isn't much documentation.</p>