Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binary input and output

Status
Not open for further replies.

Proqrammer

Programmer
Sep 17, 2006
64
0
0
Can anyone give me a simple example of how to write a string of characters into a binary file?

Thanks
 
Code:
ofstream file( "filename", [b]ios_base::binary[/b] | ios_base::out | ios_base::trunc );

file.write( data, data_size );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top