I was reading another thread where a guy asked about C++ books for beginners, and one of the programmers answering wrote this:


  Some warnings: avoid all books that present an "hello world" stating with

#include <iostream.h>



I opened my C++ book and sure enough it included the iostream header like the example above. 

Why is that bad? What other pointers should I keep in mind when learning C++?

Background: I am proficient with C and I'll start to learn C++ this next semester.

The header iostream.h is a non-standard header and does not exist on all platforms. As a matter of fact it does not exist on my system (using g++ and the GNU libstdc++). So any code using it would simply not compile on my system.

The iostream.h header used to be common before C++ was first standardized in 1998. But since the 98 standard used <iostream> instead of <iostream.h>, the latter has fallen out of favor (being non-standard and all) and is no longer supported on all platforms. Code that uses it should be considered non-standard legacy code and is not portable. Books that teach it should be considered outdated and avoided.
