Difference between <iostream> and <iostream.h>

Jul 12, 2012 at 11:01am
Hi everyone,
I just wanted to ask what the difference between these two is:

#include <iostream>

and

#include <iostream.h>

I am just a bit confused.
Jul 12, 2012 at 11:04am
<iostream.h> is an old non-standard header that some old compilers support. It puts everything in the global namespace instead of the std namespace like <iostream> does.

<iostream> is the correct one. If the compiler doesn't have it you should consider getting a more up to date compiler.
Last edited on Jul 12, 2012 at 11:08am
Jul 12, 2012 at 11:11am
Yeah, I have Visual Studio 2012 RC and so this doesn't support <iostream.h>?
But anyway, I shouldn't use it. Right?
Last edited on Jul 12, 2012 at 11:11am
Jul 12, 2012 at 11:12am
Yep, avoid it. Use #include <iostream> .
Jul 12, 2012 at 11:17am
Yeah, thanks!
Topic archived. No new replies allowed.