prev up next top/contents search

comp.lang.c FAQ list · Question 15.13

Q: How can I call a function with an argument list built up at run time?


A: There is no guaranteed or portable way to do this. If you're curious, this list's editor has a few wacky ideas you could try...

Instead of an actual argument list, you might consider passing an array of generic (void *) pointers. The called function can then step through the array, much like main() might step through argv. (Obviously this works only if you have control over all the called functions.)

(See also question 19.36.)

Additional links: “wacky ideas”


prev up next contents search
about this FAQ list about eskimo search feedback copyright

Hosted by Eskimo North

AltStyle によって変換されたページ (->オリジナル) /