Using iostream.h in VS 7.0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have just port my C++ 6.0 project into C++ project of Visual Studio.NET.
However, .NET tell me that it can not find iostream.h. Some search on the
internet tell me that I should change the #include <iostream.h> into #include
<iostream>.

Because my project is very big, It's very difficult to change like that.

Can anyone help me to use <iostream.h> in Visual Studio .NET ?

Thank in advance
 
Ly said:
Hi all,

I have just port my C++ 6.0 project into C++ project of Visual Studio.NET.
However, .NET tell me that it can not find iostream.h. Some search on the
internet tell me that I should change the #include <iostream.h> into #include
<iostream>.

Because my project is very big, It's very difficult to change like that.

Can anyone help me to use <iostream.h> in Visual Studio .NET ?

I don't think there is any way, short of writing and implementing the
missing headers yourself. <iostream.h> is a non-standard header, and a
standard alternative has now existed for 7 years... A minimum
implementation might look like this:

//ostream.h
#include <ostream>
#include <ios.h>
using std::ostream;
using std::endl;
using std::flush;
//etc.

//iostream.h
#include <iostream>
#include <ostream.h> //to bring in the using declarations above
#include <istream.h>
using std::cin;
using std::cout;
using std::cerr;
using std::clog;
//etc for wide streams.

//do the same for other headers, making sure you include your .h
versions of headers they depend on.

Note though that there are lots of incompatibilities between Microsoft
legacy IOStreams and standard IOStreams, so your best bet is probably to
migrate the code - it should only take a couple of days?

Tom
 
Back
Top