title: Why can't g++ find iostream.h?
body: <p>I'm trying to understand how to compile C++ programs from the command line using g++ and (eventually) Clang on Ubuntu.</p>
  
  <p>I found a webpage which explains MakeFiles and I am following their directions. <a href="http://mrbook.org/tutorials/make/" rel="noreferrer">http://mrbook.org/tutorials/make/</a></p>
  
  <p>I downloaded the four example files into their own directory.</p>
  
  <ul>
  <li>main.cpp</li>
  <li>hello.cpp</li>
  <li>factorial.cpp</li>
  <li>functions.h</li>
  </ul>
  
  <p>I then went ahead and ran their example of how to manually compile without a MakeFile.</p>
  
  <pre><code>g++ main.cpp hello.cpp factorial.cpp -o hello
  </code></pre>
  
  <p>When I ran the command from above, I received the following error from g++:</p>
  
  <pre><code>main.cpp:1:22: fatal error: iostream.h: No such file or directory
  compilation terminated.
  hello.cpp:1:22: fatal error: iostream.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p>My only experience with writing c++ is using an IDE such as VS C++ Express or CodeBlocks. Isn't the compiler supposed to know what iostream.h is and where to find it?</p>
  
  <p>How do I get rid of this error so the program willl compile?</p>
  
  <p>Thanks for any help. </p>