title: C++ cout gives undeclared identifier
body: <p>So, I have this question. Why does cout throws </p>
  
  <pre><code>error C2065: 'cout' : undeclared identifier
  </code></pre>
  
  <p>I am using Visual Studio 2012 as an IDE and I am writing a school project. I have everything done except an example file. So I am trying to write something on the screen like this:</p>
  
  <pre><code>#include "iostream"
  #include "stdafx.h"
  using namespace std;
  
  int main()
  {
      cout&lt;&lt;"example";
  
      return 0;
  }
  </code></pre>
  
  <p>So the problem is with cout... printf works fine, but I want to use cout.</p>
  
  <p>EDIT:
  I've changed "" to &lt;> but it is not helping. Also I am using this code only for example... This is not the whole project.</p>