M
mdh
May I clarify a few things about va_arg?
Given:
va_list ap;
int ival;
assume va_start initialized;
ival = va_arg(ap, int);
Is this correct.
The call to va_arg returns the **next** un-named argument. (after
va_start)
The **type** of argument is supplied by the second parameter. (here
"int").
The object returned is assigned to ( in this case) "ival".
Although I cannot think of a reason why you would not, but do you
always need to assign the return from va_arg?
Thanks
Given:
va_list ap;
int ival;
assume va_start initialized;
ival = va_arg(ap, int);
Is this correct.
The call to va_arg returns the **next** un-named argument. (after
va_start)
The **type** of argument is supplied by the second parameter. (here
"int").
The object returned is assigned to ( in this case) "ival".
Although I cannot think of a reason why you would not, but do you
always need to assign the return from va_arg?
Thanks