Unable to open include file IOSTREAM

Hi, I just wrote my first program hello world.

I'm getting the compilation error (unable to open include file 'iostream')

Please help
Either you are compiling the source as a C program instead of C++ or... well, actually that's it. If the compiler is set up correctly, it should know where it's own standard includes are. Try replacing #include <iostream> with #include <stdio.h>, if that works you are using the wrong compiler.
thanks for the reply

I tried #include <studio.h>, still the same compiling error.

How do I compile it as a c++ promgram? I'm unsing turbo c++ compiler using a dosbox0.74 in windows7 64 bit.

There's no such file. You've made a spelling mistake. Perhaps you made similar spelling mistake on iostream.

turbo c++ compiler using a dosbox0.74 in windows7 64 bit.

I see. Which version of Turbo C++ is it? If you have to run it under DOS, I'm guessing pretty old. Maybe you've got such an old version that it just isn't compliant to the standard. Get yourself something more recent.
Last edited on
Why are you using Turbo C++?

You could try running your code here: http://codepad.org/

That will tell you if the problem is with your code or your compiler.
It's stdio.h, NOT studio.h - i made the same mistake when I started. if it runs in dosbox, it might not be standard conform, in that case you'd have to include iostream.h instead of iostream. If that's the case though, I'd recommend you to not use it, unless it's enforced by your professor or something.
#include <iostream>
using namespace std;

int main ()

    cout<<"Hello world!"<<endl;

    return 0;

Where is the problem? :D
Janian wrote:
Where is the problem? :D

Right there :)
Last edited on
you need to add <cstdlib> for that system command to work on any other compiler. be careful when posting code from microsoft compilers they allow you to use functions from various header files without them actually being included.
yes stdio.h worked
but now it is saying declaration syntax error "namespace std;"
You definitely type the 'using' part, right? FYI, Turbo C++ was been succeeded by C++Builder and support has been discontinued. Consider using a different compiler.
It would be very helpful if you posted your code. Also, what compiler are you using? This definitely sounds like a compiler issue.
Last edited on
It may say "Turbo C++", but it is not a C++ compiler. It is an ancient relic from the time before the C++ standard.
Quote from Wikipedia:
Turbo C++ was a C++ compiler and integrated development environment (IDE) originally from Borland.
But I suppose other compilers could be used, but with the Turbo C++ IDE. Does the OP have anything to say about this?
Turbo C++ was a C++ compiler

It was a C++ compiler. Then C++ changed, and now it is not a C++ compiler.

Moschops what's the problem there? :)))
Topic archived. No new replies allowed.