title: 'cin not declared in this scope' error upon compilation
body: <p>Here is the code:</p>
  <pre><code>  #include &lt;stdlib.h&gt;
      #include &lt;iostream&gt;
      int main() {
          std::cout &lt;&lt; &quot;Enter two numbers: &quot; &lt;&lt; std::endl;
          int v1 = 0, v2 = 0;
          std:cin &gt;&gt; v1 &gt;&gt; v2;
          std::cout &lt;&lt; &quot;The sum of &quot; &lt;&lt; v1 &lt;&lt; &quot;and &quot; v2 &lt;&lt; &quot;is &quot; &lt;&lt; v1+v2 &lt;&lt; std:endl;
          return 0;
      }
  </code></pre>
  <p>Here is the error:</p>
  <pre><code>g++ x.cpp 
  #x.cpp: In function ‘int main()’:
  #x.cpp:23:9: error: ‘cin’ was not declared in this scope
  #x.cpp:23:9: note: suggested alternative:
  #In file included from x.cpp:19:0:
  #/usr/include/c++/4.7/iostream:61:18: note:   ‘std::cin’
  #x.cpp:24:48: error: expected ‘;’ before ‘v2’
  </code></pre>
  <hr />
  <p>I have corrected the code, there are several mistakes (this is my first c++ experience):</p>
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  int main() {
      std::cout &lt;&lt; &quot;Enter two numbers: &quot; &lt;&lt; std::endl;
      int v1 = 0, v2 = 0;
      std::cin &gt;&gt; v1 &gt;&gt; v2;
      std::cout &lt;&lt; &quot;The sum of &quot; &lt;&lt; v1 &lt;&lt; &quot; and &quot; &lt;&lt;  v2 &lt;&lt; &quot; is &quot; &lt;&lt; v1+v2 &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>