Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!warwick!geoff From: geoff@warwick.UUCP (Geoff Rimmer) Newsgroups: comp.lang.c Subject: Re: `va_dcl' macro question Message-ID: <991@ubu.warwick.UUCP> Date: 1 Feb 89 12:24:28 GMT References: <1964@kappl.cs.vu.nl> <9507@smoke.BRL.MIL> Sender: news@warwick.UUCP Reply-To: geoff@emerald.UUCP (Geoff Rimmer) Organization: Computer Science, Warwick University, UK Lines: 29 In article <9507@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) 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@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 ------------------------------------------------------------