Wednesday, March 25, 2009

Write a binary stream (cannot output to a string)

std::string s(record.data.buf(), record.data.size());
ofstream file1;
file1.open ("/tmp/kalyan",ios::binary);
file1.write(bytebuffer, size);
file1.close();

No comments: