To: djgpp AT sun DOT soe DOT clarkson DOT edu, raju AT xgroup DOT ernet DOT in Subject: go32 crashes, fstream problems From: rishab AT dxm DOT ernet DOT in (RISHAB GHOSH) Date: Tue, 25 Jan 94 01:08:56 IST Organization: Deus X Machina I am using DJGPP 1.11 with maint 2, and gcc/gpp 2.5.7. 1. GO32 crash ---------------------------------------- When I compiled and ran a program that's been giving a lot of trouble, this is what go32 said: MM>go32 testprog // already compiled with no errors go32 version 1.11.maint2 Copyright (C) 1993 DJ Delorie General Protection Fault at eip=810e eax=00000020 ebx=00054004 ecx=0005a974 edx=00006970 esi=5f002e64 edi=00000006 ebp=00051c1c esp=00051bf4 cs=af ds=a7 es=a7 fs=a7 gs=bf ss=b7 cr2=00001fe5 Call frame traceback EIPs: 0x0000810e 0x0000227c 0x00001ff0 0x0000148a 0x0000188e This was from a DOS box under Windows 3.1, but when I tried it outside Windows I got a similar error, though the register values might have been different. The only memory manager I am using is HIMEM.SYS. No fancy TSR's, no Stacker etc. This is happening with many (simple) programs. The story of this problem: 2. FSTREAM problems ------------------------------------------ This program and a set of other tests did very strange things when using fstream::tellg(), tellp(), seekg(), seekp(). With DJGPP 1.10 and gcc/gpp 2.4.1, seek after a tell jumped to EOF, skipped back and forth, and generally behaved madly. As other things (iomanip.h) didn't work either, I waited for the next release. After I got gcc 2.5.4 I read in the g++ faq that 2.5.x with x < 5 was bugged in the c++ implementation. By that time 2.5.7 was out, but needed maint go32. Now with go32 1.11maint2 and 2.5.7 iomanip.h is complete, but the fstream programs crash on run-time. Since my major task at the moment is evaluating DJGPP for use by some C++ students, I haven't had the time to play around with other types of programs - I am trying to get this and similar ones to work. Here is the source code for testprog ----------------------- #include class Drugs { private: unsigned int batchNo; char drugCode[5]; char category; char units[4]; float qtyProduced; void getdata(void) { cout<<"\n Enter Batch Number : "; cin>>batchNo; cout<<"\n Enter Drug Code : "; cin>>drugCode; cout<<"\n Enter Category : "; cin>>category; cout<<"\n Enter Unit Of Measurement : "; cin>>units; cout<<"\n Enter Quantity Produced : "; cin>>qtyProduced; } void showdata(void) { cout<<"\n ****** DISPLAYING RECORD ******"; cout<<"\n The Batch Number is "<>reply; }while(reply=='y'); cout<< "\n" <