`va_dcl' macro question

Geoff Rimmer geoff at warwick.UUCP
Wed Feb 1 22:24:28 AEST 1989


In article <9507 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:

>This of course applies only to varargs; in ANSI C, one has at least
>one fixed parameter and uses the ,... notation.

All I know about variable arguments in ANSI C is how to do prototypes,
and define the functions.  However, I don't know how to read each of
the arguments passed to the function.  Could someone email/post a
simple function that will take a variable number of strings, and then
print them to stdout one at a time.

i.e.

	void print_strings (char *str, ...)
	{
	...
	}

Geoff

	------------------------------------------------------------
	Geoff Rimmer, Computer Science, Warwick University, England.
			geoff at uk.ac.warwick.emerald

	"I'd like to go on with the rest of the song,
	 Describing this schmuck.
	 I'd like to go on, but I'm gonna throw up."
		- Roger Waters, Pros & Cons of Hitchhiking
	------------------------------------------------------------



More information about the Comp.lang.c mailing list