From: "David Mitchell" Newsgroups: comp.os.msdos.djgpp Subject: Files with GCC Date: Wed, 30 Jun 1999 21:22:50 +1200 Organization: Inet Ltd, Christchurch, New Zealand Lines: 38 Message-ID: <930735428.887115@kyle.inet.net.nz> NNTP-Posting-Host: kyle.inet.net.nz X-Trace: titan.xtra.co.nz 930734682 4393943 202.50.171.4 (30 Jun 1999 09:24:42 GMT) X-Complaints-To: abuse AT xtra DOT co DOT nz NNTP-Posting-Date: 30 Jun 1999 09:24:42 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Cache-Post-Path: kyle.inet.net.nz!unknown AT p89-tnt1 DOT inet DOT net DOT nz X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Could somebody tell me what is wrong with this code? int points; FILE *objFile; objFile = fopen(fname, "rt"); fscanf(objFile, "%d", points); When I run this, my program crashes with this message: Exiting due to signal SIGSEG Page fault at eip=00005df6, error=0006 eax=00000001 ebx=00066ac0 ecx=00066900 edx=001a41a0 esi=00001bcc edi=00000037 ebp=00066a30 esp=000669b0 program=D:\DAVID\OBJ\A.EXE cs: sel=00a7 base=82dae000 limit=0007ffff ds: sel=00af base=82dae000 limit=ffffffff es: sel=00af base=82dae000 limit=ffffffff fs: sel=0087 base=0001c0a0 limit=0000ffff gs: sel=00bf base=00000000 limit=ffffffff ss: sel=00af base=82dae000 limit=ffffffff Call frame traceback EIPs: 0x00005df6 0x0000597a 0x00005743 0x00002b86 0x00001cbf 0x00002092 0x0000261a What's wrong? Sorry if this is a bit vague. David