Variable Parameters

Ranjan Bagchi bagchi at dip.eecs.umich.edu
Sun Dec 31 09:05:54 AEST 1989


        I'm working, currently, on a project that involves a function that
could take any number or arguments.  I would like to pass it only
those arguments, i.e. no "flags" at the end which tell the function
to stop.

        I'm using ANSI C, and believe my options are either to pass
the function an array, or to use the elipsis for unspecified.

	The problems with each is that (for the first), given the array
I have no way of knowing the size of the array (do I?) given only
the array.  For the second, I have no idea how to use an elipsis.
 
	Any ideas?
 
	Thanks...rj
	bagchi.sparky.eecs.umich.edu
 
	(If I'm dealing with something trivial, E-mail, please)
ZZ
 



More information about the Comp.lang.c mailing list