🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3463

Help - New C programer

#3463
From: John W. Rugo
Date: Tue, 07 Nov 1995 15:52
39 lines
1738 bytes
Hi,

I'm a new C programer buff and am having a problem with my code.
I am just creating a little address program to test my skills and
try my hand at reading and writing to a file.

The problem at this point is the compiling errors under my "query"
function.  I don't know if I should show you my entire code or just
the part that is failing.  If you need more code to figure this out
please let me know.

The part of the code that is failing is:

while(!feof(fp)) {
        for (l=0; l<rec_num; ++l) {
                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))
                        print_rec(l);
        }/*End For */

The error's are as follows:

addbook.c(156): Error! E1151: Parameter count does not agree with 
previous definition
There are nine entries consecutively for this error.

Error(E42): Last command making (e:\develop\addbook\addbook.obj 
returned a bad status
Error(E02): Make execution terminated

Thank you for any help that anyone can give,
John.


/------------------------------------\
John W. Rugo
jwrugo@raven.cybercom.com
Technical Details
Message-ID: <47nvbf$956@crow.cybercomm.net>
Path: arc1-ca.pugleaf.net!news.cybercomm.net!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.cybercomm.net!usenet
From: jwrugo@raven.cybercom.com (John W. Rugo)
Newsgroups: comp.std.c,comp.lang.c
Subject: Help - New C programer
Date: 7 Nov 1995 15:52:15 GMT
Organization: [Self]
Message-ID: <47nvbf$956@crow.cybercomm.net>
NNTP-Posting-Host: sl-004.sl.cybercomm.net
X-Newsreader: NeoLogic News for OS/2 [version: 4.2]