Date: Thu, 5 Nov 1998 09:20:30 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: The zr0 cc: djgpp AT delorie DOT com Subject: Re: whats wrong w/ this code? In-Reply-To: <19981104231513.27592.00001445@ng84.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On 5 Nov 1998, The zr0 wrote: > char *main(int argc, char *argv[]) { Bug no.1: `main' should return an int, like this: int main(int argc, char *argv[]) > for(count=2;count count++; > show_file(count,argv); Bug no.3: you increment count *before* calling show_file, so you actually begin with argv[3], and the last argument passed is argv[argc], which is a NULL pointer.