Variable Arguments
I'm interested in passing variable arguments, and then passing them again
onto a routine that accepts variable argument.
I would appreciate suggestions regarding a method to this idea. Below is
an attempt, which Aztec 5.0b stops on the line marked below. Again,
solutions or ideas would be appreciated.
/********** Test of passing of varying arguments **********/
#include <stdarg.h> #include <stdio.h>
void main()
{
int a,b,c,d;
a=1;b=2;c=3;d=4;
testf("Here goes: a=%d b=%d c=%d d=%d \n\n",a,b,c,d); }
void testf(str,…)/*** Compiler says 'invalid function arg'***/
va_list arg; char *str
{
va_list arg;
printf(str,arg);
return(); }