To: djgpp AT delorie DOT com References: <2 DOT 07b4 DOT PZ9S DOT FJ8E10 AT pauzner DOT mccme DOT ru> Message-Id: <2.07b5.3MYIJ.FOJEW0@pauzner.mccme.ru> From: "Leonid Pauzner" Date: Tue, 18 Jan 2000 18:26:24 +0300 (MSK) X-Mailer: dMail [Demos Mail for DOS v2.07b5] Subject: DJGPP/GPP: can not open C++ [io]fstream in binary mode Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com I run into the following problem: using DJGPP 2.02-2.03 and GCC/GPP 2.81 or 2.95.1 on a plain i386/DOS 6.22 machine I can not open fstream in BINARY mode, e.g. I got zero size file from the sample program below. If this is G++ problem could you forward this message to GCC/G++ mailing list, please. It is OK when I use FILE *fp; fp = open(somename, "wb"); though. Leonid. #include #include int main (int argc, char *argv[]) { ofstream fpw (argv[1], ios::binary); for (int i=0; i<256; i++) { fpw.put( ((char)i) ); } }