cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/30/19:31:04

From: "Campbell, Rolf [SKY:1U32:EXCH]" <cp1v45 AT americasm01 DOT nt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Files with GCC
Date: Wed, 30 Jun 1999 09:01:34 -0400
Organization: Nortel Networks
Lines: 23
Message-ID: <377A152E.3A6B5635@americasm01.nt.com>
References: <930735428 DOT 887115 AT kyle DOT inet DOT net DOT nz>
NNTP-Posting-Host: bmerhc00.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.6 [en] (X11; I; HP-UX B.10.20 9000/712)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

David Mitchell wrote:

> Could somebody tell me what is wrong with this code?
>
> int points;
> FILE *objFile;
>
> objFile = fopen(fname, "rt");
>
> fscanf(objFile, "%d", points);

fscanf(objFile, "%d", &points);

> What's wrong?  Sorry if this is a bit vague.

    You were passing the value of the interger, not the address, therefore,
it was trying to stuff the value into an undisclosed (arbitry) address.

--
     -Rolf Campbell (39)3-6318



- Raw text -


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