Mail Archives: djgpp/1998/07/03/03:41:08
I'm using Outlook Ekspress with 'plain text.' If encoded, what more do I
haveto do?
My problem is writing a binary file using STL and iostream; I thought that
this should work:
vector<TYPE> v;
- populate vector and print vector to stdout - works fine OK
// open output file stream in binary mode
ofstream ofs("data.dat", ios::out | ios::bin | ios::trunc );
// create iterator
ostream_iterator<TYPE> ofi(ofs," ");
// write to file
copy(v.begin(), v.end(), ofi);
This code compiles but just writes an odinary asci file??
Any help appreciated
- Raw text -