Mail Archives: djgpp/1994/02/07/11:10:15
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 <iostream.h>
#include <fstream.h>
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
- Raw text -