"David Harmon" <source@netcom.com> wrote in message
news:40428ac6.45590726@news.west.earthlink.net...[color=blue]
> On 9 Feb 2004 23:22:04 -0800 in comp.lang.c++,
ram_laxman@india.com[/color]
(Ram[color=blue]
> Laxman) was alleged to have written:[color=green]
> >Does anybody know how to fix it.Iam using VC++ 6.0.
> >
> >#include<fstream>
> >#include<ios>
> >#include <iostream.h>[/color]
>
> Never use
> #include <iostream.h>
> It belongs to an old, obsolete, bad version of the io library that
> will make you crazy.[/color]
Well, it was okay in its day. Some day there will be an 'oldies'
revival. But if you have to use the old headers for some reason, you
can't mix them with the new ones, such as <fstream>.
[color=blue]
>
> Instead use
> #include <iostream>
>
> This will go along very happily with the
> using namespace std.
> that you already have.
>
> The same thing applies with less emphasis to the other .h C++[/color]
includes.[color=blue]
>[/color]
It's not quite the same. <iostream.h> and its cousins are prestandard
headers which have been completely replaced by <iostream>, etc. The
headers from the C standard librarary, ending in '.h', such as
<stdio.h>, are part of the C++ standard library, and are perfectly
okay to use. Unless you have some good reason, however, its better to
use the versions prefixed by 'c', such as <cstdio>.
Jonathan