X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Wed, 9 Jan 2002 14:15:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Drac0 cc: djgpp AT delorie DOT com Subject: Re: command line argument In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 9 Jan 2002, Drac0 wrote: > main(int argc, int * argv[]) This should say int main (int argc, char *argv[]) > if(* argv[1] >= 100) You shouldn't use *argv[1] if argc isn't at least 2. Otherwise, argv[2] is a NULL pointer, and dereferencing a NULL pointer is a no-no.