www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/06/00:54:51

Date: Mon, 6 May 1996 14:40:52 +1000
From: root <root AT linuxbox DOT nse DOT com DOT au>
Message-Id: <199605060440.OAA01482@linuxbox.nse.com.au>
To: akroev AT sn DOT no
CC: djgpp AT delorie DOT com
Subject: Error in printf()-documentation (djgpp v2)...
In-Reply-To: <74607802@toto.iv>
Reply-To: naderr AT topaz DOT cqu DOT edu DOT au

akroev AT sn DOT no writes:
 > I am using djgpp v2 while trying to learn C.
 > 
 > While doing this, I needed to print out an int variable. I used
 > printf("%d\n", intvariable), remembering to #include <stdio.h>,
 > but I got the warning "Wrong format specifier...", so I looked
 > up the Info.
 > 
 > The Info-file on libc.a told me to use "%D" as format specifier
 > for a long int variable (since ints are equal to long ints in
 > djgpp).

			%ld

Hope this helps

Cheers,

		Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019