Dynamic Function Parameters

kanaks_go4ex's Avatar, Join Date: Jun 2008
Go4Expert Member
Hi all,

I'm little confused.

Is it possible to choose number of arguments 'n' for the function "F" in run time?
Function 'F' ('n ')

If possible,how do we declare the prototype for this Function 'F' ?

oogabooga's Avatar
Ambitious contributor
Look up "variable length argument lists".

"printf" uses a variable number of arguments.
printf("%d %d", 1, 2);
The prototype for printf is
int printf(const char *format, ...);
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Look at OutputDebugString with variable number of arguments where I have applied a wrapper for a function to give a variable number of arguments