Topic: ROOKIE NEEDS HELP


Author: cfalk@engr.UVic.CA (Chris Falk)
Date: Sat, 9 Oct 93 02:29:14 GMT
Raw View
I am trying to create a certain file structure in a program I am writing using Borland's Turbo C++.  I am quite familiar with the various libraries and stream structure of I/O with C and C++ (Or maybe I'm not and that's my problem!)  Using Pascal, I could always use the "File of" statement to create a file of a user defined record.  The file was always stored in binary format, and numerical values were all hidden to the "type" command in DOS.  I want to do this in C++!!

I know that binary files can be created in C and C++, but all I seem to end up with is text files(i.e. no characters are written in binary at all) with no end of lines.  Should the extraction (<<) and insertion (>>) operators of fstream.h be modified to handle my structs, or what?  Your assistance will be greeted with dancing and screaming.

Chris Falk
2nd Year (That means I know nothing.)
Electrical Engineering, University of Victoria

"It's weird out there, man."
            -Former President George Bush

Email: cfalk@engr.UVic.CA