www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/07:19:24

Message-ID: <004a01bda4e1$84aa6bc0$200d18ac@OSEK12.hosp.dk>
From: "=?iso-8859-1?Q?S=F8ren_Merser?=" <merser AT inet DOT uni2 DOT dk>
To: "DJGPP" <djgpp AT delorie DOT com>
Subject: writing binary data
Date: Wed, 1 Jul 1998 13:15:08 +0200
MIME-Version: 1.0

HI
I'm having trouble doing this:

vector<TYPE> v;
- populate vector
-print vector to stdout OK

// write vector to binary 
ofstream ofs("data.dat",  ios::out | ios::bin | ios::trunc );
ostream_iterator<TYPE> ofi(ofs,"");
copy(v.begin(), v.end(), ofi);

compiles but just writes odinary text file??

Any help apperciated

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019