www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/13/04:15:21

From: "Tony O'Bryan" <aho450s AT nic DOT smsu DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: fopen() gives Segmentation Fault. Help ?
Date: Wed, 12 Nov 1997 21:48:15 -0600
Organization: Southwest Missouri State University
Lines: 12
Message-ID: <346A787F.5981@nic.smsu.edu>
References: <3 DOT 0 DOT 16 DOT 19971111193131 DOT 35afdc80 AT hem1 DOT passagen DOT se> <3468C09B DOT 436A AT nortel DOT ca> <Pine DOT OSF DOT 3 DOT 96 DOT 971113125536 DOT 13260B-100000 AT barra DOT jcu DOT edu DOT au>
Reply-To: aho450s AT nic DOT smsu DOT edu
NNTP-Posting-Host: clark.a40.smsu.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Oon Lin wrote:
> 
> I'm having problem using fopen() in DJGPP. What happened is that I made a
> first fopen() call to open a file for reading only and that works
> fine..and when I call the second fopen() (after I closed the first
> fopen())  it just gives me General Protection Fault with Segmentation
> violation .... anybody has any ideas ??

Your program compiled and ran fine on my machine.  I added a return if
the file couldn't be opened for read, and I #included <stdio.h> and
formatted the code to my taste, but I didn't change any other
statements.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019