lin-club  

Re: passing variable number of arguments to a function

guy keren
Fri, 03 Aug 2001 19:26:58 -0700


On Sat, 4 Aug 2001, Amir Abiri wrote:

> 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).

also man vprintf and vfprintf, for completeness.

> at the moment all i have is using assembler ( Visual C++ 6.0):

are we dealing with linux or with windows here? in any case, using such
assembly code is completely compiler dependant.

--
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy