title: in c++, .h file include file but does not work
body: <p>i declare a string variable in my .h file and assign it in my .cpp file
  demo.h:</p>
  <pre><code>#ifndef DEMO_H
  #define DEMO_H
  #include &lt;string&gt;
  string s;
  #endif
  </code></pre>
  <p>and demo.cpp:</p>
  <pre><code>#include &quot;demo.h&quot;
  int main(){
    s = &quot;s&quot;;
    return 0;
  }
  </code></pre>
  <p>when i compile demo.cpp it says that</p>
  <blockquote>
  <p>demo.h: error: ‘string’ does not name a type</p>
  <p>demo.cpp:error: ‘s’ was not declared in this scope</p>
  </blockquote>
  <p>but i actually include string in my .h file
  i don't know why it doesn't work</p>