Advertisement

Variable Arguments - passing them on

Started by August 26, 2000 10:15 PM
0 comments, last by GeniX 24 years, 4 months ago
Hi, Lets say I accept a bunch of parameters as such (im gonna try out the source tags i saw someone post about
    
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
regards,GeniXwww.cryo-genix.net
OK nevermind - solved.

Just use

vprintf( FormatStr,mylist );

and it works..

nevermind all

regards,GeniXwww.cryo-genix.net

This topic is closed to new replies.

Advertisement