Currently i have a program that loads binary data into a stringstream and then pases the data to a fstream like so:
stringstream ss(stringstream::binary | st
Use the streambuf members, that's what they are for:
fout << ss.rdbuf();