 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lurkos Guest
|
Posted: Thu Jun 28, 2012 5:48 pm Post subject: va_list + function pointers |
|
|
Hello.
I'm trying to figure out how can I make use of stdarg.h/va_list with
function pointers as variable arguments.
In particular I don't know which type I should put in va_arg call and
which name I should put in va_start call.
Do you know how to implement it in C?
Thanks!
e.g. (just tentative)
double myFunc(int k, double x, double (*fp1)(double,int), ...)
{
double result;
va_list vl;
va_start(vl, ????????);
do {
double (*fp_new)(double,int) = va_arg(vl, ???????);
// do stuff
} while ( (*fp_new) != NULL );
va_end(vl);
return result;
} |
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|