Message-Id: <351C6FD4.7393@nease.net> Date: Sat, 28 Mar 1998 11:34:44 +0800 From: Cloud Wu Mime-Version: 1.0 To: djgpp AT delorie DOT com Subject: cprintf() 's question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk I'm a new user of djgpp. Yesterday, I wrote a program by djgpp. I want to print the left 80 char of a string, and use cprinf like this #define WIDTH 80 char s[200]; ... gotoxy(1,1); cprintf("%-*s",WIDTH,s); ... but, the left of my string s was cut. :-( The right part of the string was printed in the middle of screen. I remember, "%-*s" is to say leftjustify the output, Why? In Borland C, this is correct. btw, I use djgpp 2.8.0 and djdev2.01