iostream.h

closed account (28poGNh0)
Hello everyone
I saw this directicve # include <iostream.h> in some cpp tuto book
but when I tryied to compile it with code::blocks .I get an error :
"iostream.h:No such file or directory"
I wondered is that an old c/cpp luangage.
any info would be appreciated
closed account (z05DSL3A)
<iostream.h> is old, if I remember correctly it is pre-standardisation C++.
closed account (N36fSL3A)
Yea. It's depreciated now.
Pre-ASNI C++ treats headers as files and had the .h extension. Current C++11 standard doesn't require that you use the .h extension. But in case you use headers like stdlib.h, stdio.h, etc, you can use but in C++11 you use them as cstdlib, cstdio, etc.

Only iostream erquires that you use iostream and NOT iostream.h.

The new-style headers are not filenames, they do not have a .h extension. They consist solely of the header name contained between angle brackets. For example, here are some of the new-style headers supported by Standard C++.

<iostream> <fstream> <vector> <string>

Hope that helped
The new-style headers are not filenames, they do not have a .h extension.

Just because they don't have a .h extension, it doesn't mean they're not filenames.

Both my gcc 4.5.1 installation on Linux, and my Visual Studio 2010 Pro installation on Windows, contain header files called "iostream" with no extension.

Why do you think they're not filenames?

closed account (z05DSL3A)
Lumpkin, depreciated is not the correct word for it, obsolete might be.

Deprecated means that it is still available but you should change it as it may not be available in the next release.
closed account (28poGNh0)
so as conculsion <iostream.h> was befour the standarazation of c++,
am I right?
Yes you are right. If you want elaborate details Google it.
Last edited on
closed account (28poGNh0)
well thanks all of you
Topic archived. No new replies allowed.