title: C++ Visual Studio class error identifier string is undefined
body: <p>I made a class. the header file is :</p>
  
  <pre><code>   #pragma once
  #include &lt;string&gt;
  class Player
  {
  public:
      Player();
  private:
  };
  </code></pre>
  
  <p>and the cpp file is :</p>
  
  <pre><code>#include "Player.h"
  #include &lt;iostream&gt;
  Player::Player()
  {
  }
  </code></pre>
  
  <p>When I define a string in the header file and add an argument to the Player function in the header file everything works fine</p>
  
  <pre><code>#pragma once
  #include &lt;string&gt;
  class Player
  {
  public:
      Player(string name);
  private:
      string _name;
  };
  </code></pre>
  
  <p>but when I add the same argument to the Player function in the cpp file</p>
  
  <pre><code>#include "Player.h"
  #include &lt;iostream&gt;
  Player::Player(string name)
  {
  }
  </code></pre>
  
  <p>I get an error: identifier "string" is undefined and I get the same error in the header file as well so it effects that too. I tried including string in the cpp file in hopes of solving the problem but it did not work. I'm really desperate for a solution, guys.</p>