title: cout is not a member of std
body: <p>I'm practicing using mulitple files and header files etc. So I have this project which takes two numbers and then adds them. Pretty simple.</p>
  
  <p>Here are my files:</p>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "add.h"
  
  int main()
  {
      int x = readNumber();
      int y = readNumber();
  
      writeAnswer(x + y);
  
      return(0);
  }
  </code></pre>
  
  <p><strong>io.cpp</strong></p>
  
  <pre><code>int readNumber()
  {
      int x;
  
      std::cout &lt;&lt; "Number: ";
      std::cin &gt;&gt; x;
  
      return x;
  }
  
  void writeAnswer(int x)
  {
      std::cout &lt;&lt; "Answer: ";
      std::cout &lt;&lt; x;
  }
  </code></pre>
  
  <p><strong>add.h</strong></p>
  
  <pre><code>#ifndef ADD_H_INCLUDED
  #define ADD_H_INCLUDED
  
  int readNumber();
  void writeAnswer(int x);
  
  #endif // #ifndef ADD_H_INCLUDED
  </code></pre>
  
  <p>The error is showing up in io.cpp. The exact errors are:</p>
  
  <p><a href="https://i.stack.imgur.com/fRKEB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fRKEB.png" alt="enter image description here"></a></p>
  
  <p>Does anyone have any idea why this may be happening? Thanks.</p>
  
  <p><strong>EDIT: I made a small project yesterday with the same amount of files (2 .cpp and 1.h) and I didn't include the iostream header in the other .cpp and it still compiled and ran fine.</strong></p>