From: bheuman AT msfp31 DOT gwdg DOT de (Bernd Heumann) Subject: Opening files for append To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Mon, 7 Feb 94 16:22:13 NFT Hi I'm trying to port some programms from Linux to DOS and got problems when opening Files in append mode. The following program runs well under Linux but crashes under DOS with 'General Protection Fault'. Any Ideas ? #include #include main() { cout << "Hallo \n"; /* Working Code */ //ofstream outf("Test.Out"); //ofstream outf("Test.Out",ios::out | ios::text); /* Failing Code */ ofstream outf("Test.Out",ios::app); //ofstream outf("Test.Out",ios::out | ios::text | ios::app); cout << "Writing to File \n"; for (int i=1;i<=10;i++) outf << " Line " << i << "written \n" ; } Bernd Heumann MPI fuer Stroemungsforschung 37073 Goettingen Gemany bheuman AT msfp31 DOT gwdg DOT de