Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2005

Tip: Looking for answers? Try searching our database.

Using iostream.h in VS 7.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ly Hoang Hai - 16 Nov 2005 09:20 GMT
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
Tom Widmer [VC++ MVP] - 16 Nov 2005 10:22 GMT
> Hi all,
>
[quoted text clipped - 6 lines]
>
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.