Date: Thu, 1 Sep 94 19:55:17 EDT From: dliu AT faraday-gw DOT njit DOT edu (Dong Liu) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: libgpp ofstream bug? Mailer: VM 5.32 (beta) for GNU Emacs 18.59.5 This little program will not work when compiled by gcc 2.6.0 with libgpp 2.60 ---- test program --- #include #include main() { ofstream of("test.dat", ios::bin); of << "hello\nworld\n\r"; if (!of) cerr << "Error writing to file\n"; } It will work when compiled by MSVC (replacing ios::bin with ios::binary). To make it work with libgpp I need to use a line like this ofstream of("test.dat", ios::bin|ios::out); Is an ofstream object supposed to be for output? -- Dong Liu Electrical and Computer Engineering Department New Jersey Institute of Technology, Newark, NJ 07102