From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Help with variable argument-list (va_list) Date: 29 Sep 2000 09:37:34 GMT Organization: Aachen University of Technology (RWTH) Lines: 17 Message-ID: <8r1nsu$q93$1@nets3.rz.RWTH-Aachen.DE> References: <39D39533 DOT 33F46DA4 AT wxs DOT nl> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 970220254 26915 137.226.32.75 (29 Sep 2000 09:37:34 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 29 Sep 2000 09:37:34 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com [F'up2 limited to DJGPP newsgroup...] In comp.os.msdos.djgpp A. Jans-Beken wrote: > I am trying to create a wrapper for a function that uses a variable > argument list (like printf). You can't do that, at least not in a portable way. You cannot construct a variable argument list at run time. A function can take a variable number of arguments, but no funcation can *call* another with a number of arguments that is not fixed at compile time. That's why there is the function 'vprintf()', too. Look it up (together with the macros like va_arg(), va_start() and friends) in your favourite textbook or tutorial. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.