From: Mr WT Wong Subject: Bug in ostream To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP List) Date: Wed, 27 Jul 1994 23:54:17 +1000 (EST) Hi everyone, I've encountered a problem when I open an output stream in append mode. The program simply crashes. Below is the listing of the program. It compiles but doesn't run. #include #include int main() { int mode = ios::out|ios::app; ofstream os("main2.out", ios::out|ios::app); // ofstream os("main2.out", ios::out); // this works! if (!os) { cerr << "unable to open file\n"; exit (-1); } os << "This is a test\n"; os.close(); } I've tried this program out using gcc on a DecStation which is version 2.5.6 and it works. Could this be a bug in the gpp library ? I've installed all the maintenance files and the libgpp.a file is dated 12/15/93. Thanks for any replies. regards, John -- John Wong | Tel : 905 5535 Elec. & Comp. Systems Eng. | email : wtwong AT fawlty7 DOT eng DOT monash DOT edu DOT au Monash University | Clayton, Victoria | "Do it or do it not, there is no try" Australia | - Yoda, TESB