🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3464

Re: Help - New C programer

#3464
From: Stephen Baynes
Date: Wed, 08 Nov 1995 08:25
26 lines
1645 bytes
John W. Rugo (jwrugo@raven.cybercom.com) wrote:
: Hi,

: I'm a new C programer buff and am having a problem with my code.

:                 if((fgets(dbinfo[l].lname) == &last_n) || (fgets(dbinfo[l].fname) == &first_n) ||
:                 (fgets(dbinfo[l].mname) == &middle_n) || (fgets(dbinfo[l].street) == &st) ||
:                 (fgets(dbinfo[l].city) == &cty) || (fgets(dbinfo[l].state) == &sta) ||
:                 (fgets(dbinfo[l].zip) == &zp) || (fgets(dbinfo[l].phone) == &ph))

: addbook.c(156): Error! E1151: Parameter count does not agree with 
: previous definition

The ANSI C standard spcifies fgets as having two parameters. Assuming you
have included <stdio.h> (which will provide a prototype) the compiler is 
required to issue a diagnostic that you have provided the wrong number of
parameters.

[If you post a question like this to comp.std.c expect a comp.std.c answer
  Folloups to comp.lang.c only.]

--
Stephen Baynes                              baynes@mulsoc2.serigate.philips.nl
Philips Semiconductors Ltd
Southampton                                 My views are my own.
United Kingdom
Technical Details
Message-ID: <DHpu28.36M@ukpsshp1.serigate.philips.nl>
Path: arc1-ca.pugleaf.net!phcoms4.seri.philips.nl!panther!baynes
References: <47nvbf$956@crow.cybercomm.net>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.lang.c
Path: arc1-ca.pugleaf.net!phcoms4.seri.philips.nl!panther!baynes
From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
Subject: Re: Help - New C programer
Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
Message-ID: <DHpu28.36M@ukpsshp1.serigate.philips.nl>
Date: Wed, 8 Nov 1995 08:25:19 GMT
References: <47nvbf$956@crow.cybercomm.net>
Organization: Philips Semiconductors, Southampton, UK
X-Newsreader: TIN [version 1.2 PL2]
Followup-To: comp.lang.c