www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/20/17:31:33

Reply-To: "Sean Middledich" <sean DOT middleditch AT use DOT net>
From: "Sean Middledich" <sean DOT middleditch AT usa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: making a printf type function
Date: Sun, 19 Jul 1998 15:02:36 -0400
Lines: 21
Organization: AwesomePlay Productions
NNTP-Posting-Host: usr18-073.provide.net
Message-ID: <35b2439f.0@news.provide.net>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I was wondering how to the ... to make a printf type function.  My current
project uses a screen buffer, but the function I use to write strings to the
buffer can only use one string at a time.  If I wanted to do a porintf type
effect, I have to do this:

char Text[81];

sprintf ( Text, "String A: %s, Number A: %d", StringA, NumB );
Print ( Text );

I would love to take out the business with Text[81] and sprintf.  I just
need to know how to use the ... ( elipse was it called? ).

Sean Middleditch ( the baffled programmer )
 of
AwesomePlay Productions
http://www.angelfire.com/biz/aweplay
aweplay AT hotmail DOT com



- Raw text -


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