Date: Tue, 13 Jun 2000 16:22:24 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Alastair Hogge cc: DJGPP Subject: Re: conversion specifier. In-Reply-To: <008501bfd532$7aee9380$de0f3acb@default> 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 Tue, 13 Jun 2000, Alastair Hogge wrote: > My Code: > unsigned long foo; > printf("%d", foo); > > My compiler warnings: > ...warning: int format, long int arg (arg 2) > > What does this mean? It means what it says: the second argument of the call to printf is a long int, but the format you are using to print it, "%d" is for int's, not for long's. Use "%lu" instead, and the compiler will be happy (`u' because it's an _unsigned_ long, not just long).