title: Cin and Cout not working
body: <pre><code>#include &lt;iostream&gt;
  #include "stdafx.h"
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      //Variables in which student info is stored
      string name = "";
  
      //asks user for their name
      cout &lt;&lt; "/nHello, my name is Hal, what is your name? ";
  
      cin &gt;&gt; name;
  
      cout &lt;&lt; "/nWelcome to C++ ";
      cout &lt;&lt; name;
      cout &lt;&lt; ", let the adventure begin!";
  
      return 0;
  }
  </code></pre>
  
  <p>Really basic code that I can't seem to get to work. Everywhere I have cin or cout the compiler says they're an undeclared identifier. I've looked at all of the answers on here and other forums and it none of the solutions seem to fix it. Thanks in advance.</p>