c++ won't compile

c++ won't compile it say errors and high lights #include <iostream>
Last edited on
If you are using an old compiler (say Turbo C++ 4.X) then you'll have to include the extension name,i mean
#include<iostream.h>
new compilers do auto-complete it though
Another suggestion:
If you are using GCC/MingW compiler take sure to name your source file .cpp instead of .c or set explicitly the c++ language flag.
new compilers do auto-complete it though

They don't "auto-complete it". iostream.h is simply wrong, nowadays.
new compilers do auto-complete it though

They don't "auto-complete it". iostream.h is simply wrong, nowadays.


For any beginner purposes, they may as well complete it. They contain essentially the same functions.
#include <iostream.h> doesn't even compile for me. I think iostream.h usually don't put things in the std namespace which is an important difference.
which compiler are you using?
<iostream.h> why?? I never see this. What's wrong with using the norm?
I ask again, which compiler are you using? The reason is only compilers prior to c++98 only use #include <iostream.h> Why it can't find it might because the library isn't installed is one assumption. Another one is that the compiler has been corrupted for which directories it searches for by default; this situation would require re-installing the compiler from the disk/files it came with.
@Azagaros, are you asking me? I use gcc 4.7 but it doesn't really matter. I just tried to point out to NerdTastic that <iostream.h> and <iostream> are not interchangeable. <iostream.h> is a non-standard header so it doesn't have to exist. justis1 is probably using an old compiler.
Topic archived. No new replies allowed.