Archived

This topic is now archived and is closed to further replies.

EbonySeraph

File I/O In .NET(and VC++ 6)

Recommended Posts

EbonySeraph    122
On my current project I need to be able to read and write to more than one file at a time. I noticed that when I use file streams through fstream.h I get ambiguity errors when I declare the 2nd and sequential instances of the data type ifstream. This error comes in in VC++ 6.0 and VC++.NET. Also, in .NET it says that old iostreams are depreciated(or something like it). I want to know two things: What should I do to enable me to read and write from multiple files at once? What would be acceptable to VC++.NET? EDIT: If you suggest a method it would be nice if you could briefly mention the methods used to read strings and numbers from a file, and writing to it too. I need to be able to get numbers and strings from the same file "nicely." Thanks. "Ogun's Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem. [edited by - EbonySeraph on January 29, 2003 8:30:56 AM]

Share this post


Link to post
Share on other sites
sark    104
It says old iostreams are depreciated because they are. Use <fstream> instead, and pop a using namespace std; underneath your file includes in your implementation file.

Share this post


Link to post
Share on other sites