PDA

View Full Version : Help Opening File as a Binary



loganwm
July 24th, 2008, 01:57 AM
I'm attempting to open a file as a binary using the iostream header, can you help me?

era86
July 24th, 2008, 06:33 AM
I'm assuming C++. What exactly are you having problems with?

Just do what you normally do when opening a file and create a filestream. Use ios::binary as the mode like so:

outf.open( "filename", ios::binary );

Go here for more info:
http://www.cplusplus.com/doc/tutorial/files.html