delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/30/18:50:32

From: "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
To: <djgpp AT delorie DOT com>
Subject: Re: Files with GCC
Date: Wed, 30 Jun 1999 16:38:20 -0600
Message-ID: <01bec349$414dcfc0$LocalHost@thendren>
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
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);


points should be &points, since fscanf needs to know where to put the value.
C passes arguments by value by default.  check your libc docs.

    -={C}=-

- Raw text -


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