iostream.h: no such file in directory

Hi,

I've been using codeblocks and have even tried Visual C++ 2010 Express and niether of them seem to have the header file iostream. I use to use it with mingw gcc, but I'd much rather use a program like codoblocks or Visual C++. Could anyone explain to me how to use that header file with codeblock, or guide me to another debugger/compliler program that includes iostream?

Any help, explanation or walk through of what I need to do, would be greatly appreciated. I would happily pay you or send you beer for helping me with this if (yourAge >= 21).

Steve
It's <iostream>, not <iostream.h>
ya I support the Disch answer.It's #include<iostream> ,not #include<iostream.h>
Thanks, but that was the first thing I tried. I'm pretty sure the only difference there is whether 'iostream' is a local file or not. It doesn't work either way. Does the header file work for any of you? If so, what program are you using?
I'm pretty sure the only difference there is whether 'iostream' is a local file or not.


That is incorrect. iostream.h and iostream are different files with different names, and they have different internals (the most obvious of which is namespaces). Modern compilers don't come with iostream.h

If your compiler cannot find iostream, then it's broken in some way. Maybe installed incorrectly, maybe it does not have the include paths set up.
Last edited on
sorry, I guess codeblocks is taking it as iostream, but cout, cin and endl aren't declared in iostream. I opened iostream and I see it in there and have no idea why it's not taking cin or cout.
It's because they're in the std namespace.

Either use std::cin and std::cout, or put using namespace std; after your includes.
Wow, It freekin works! Why doesn't the text book mention that? Well, it was published in 2001. Thanks a bunch!
Yeah that's the problem with outdated learning materials.

FWIW, the previous standard came out in 2003, so anything published before that probably isn't worth reading.

And I say previous standard because the latest just came out this year.
Do you recommend any updated learning materials? Everything that I find on Amazon seems to be at least a few years old.
Topic archived. No new replies allowed.