lin-club  

Re: passing variable number of arguments to a function

Nadav Har'El
Fri, 03 Aug 2001 15:03:47 -0700

On Sat, Aug 04, 2001, guy keren wrote about "Re: passing variable number of arguments 
to a function":
> > Does anyone know how to pass a variable number of arguments to a function ?
> 
> man va_start, man va_end, man va_arg
> 
> i'm not completely sure how portable this is - but i think it should be
> part of some standard by now (not sure which, though).

As far as I remember, these are part of ANSI C.
You'll have to include <stdarg.h>, not <varargs.h> - if I remember correctly
the latter is part of some old K&R C implementation of the same idea. But
look at your favorite ANSI C book for more info about stdarg.


-- 
Nadav Har'El                        |        Saturday, Aug  4 2001, 15 Av 5761
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |"A mathematician is a device for turning
http://nadav.harel.org.il           |coffee into theorems" -- P. Erdos