P
prasanthag
Hi,
I am a newbie to this group. I have a problem in handling the variable
arguments passed to a function. My requirement is like this.
I have 2 functions say,
void funcX(int i, int j);
void funcY(int i, int j,char *name);
Now I want to register this function some how and store the variable
arguments ( and store defualt values) for future use
RegisterFunc(funcX,10,20);
RegisterFunc(funcY,50,60,"MyName");
( Here I want to know how I can register and store the variable
arguments and function pointers, so that it can be used at a later
point to invoke the same)
Now at a later point I want to evoke these store functions in a
sequential order.
CallFuncs()
{
//Invoke funcX with values registered here;
//Invoke funcY with values registered here;
}
I was trying to use va_args with C and somehow i was not able to be
successful. If anybody have a better suggestion/design on how to do it,
please let me know.
I am a newbie to this group. I have a problem in handling the variable
arguments passed to a function. My requirement is like this.
I have 2 functions say,
void funcX(int i, int j);
void funcY(int i, int j,char *name);
Now I want to register this function some how and store the variable
arguments ( and store defualt values) for future use
RegisterFunc(funcX,10,20);
RegisterFunc(funcY,50,60,"MyName");
( Here I want to know how I can register and store the variable
arguments and function pointers, so that it can be used at a later
point to invoke the same)
Now at a later point I want to evoke these store functions in a
sequential order.
CallFuncs()
{
//Invoke funcX with values registered here;
//Invoke funcY with values registered here;
}
I was trying to use va_args with C and somehow i was not able to be
successful. If anybody have a better suggestion/design on how to do it,
please let me know.