void myfunc( char* FormatStr, ... )
{
va_list mylist;
va_start( mylist,FormatStr );
/* some stuff */
va_end( mylist );
}
basically what i want to do inside "some stuff" is to not look at the variable params, but pass them on to another routine like printf...
now i have tried:
printf( FormatStr, mylist );
printf( FormatStr, &mylist );
printf( FormatStr, *mylist );
but i cant get it to pass them args on!!!
regards,
GeniX
Variable Arguments - passing them on
Hi,
Lets say I accept a bunch of parameters as such (im gonna try out the source tags i saw someone post about
regards,GeniXwww.cryo-genix.net
OK nevermind - solved.
Just use
vprintf( FormatStr,mylist );
and it works..
nevermind all
Just use
vprintf( FormatStr,mylist );
and it works..
nevermind all
regards,GeniXwww.cryo-genix.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement