|
||
<data type> va_arg( va_list args, <data type> )
va_list args; /* variable argument list */ <data type>; /* next argument data type */
|
|
|||
Synopsis |
#include "stdarg.h"
The va_arg macro retrieves an argument of type <data type> based on the value of the va_list variable.
|
|
||
Parameters |
args is the address of a va_list , used to hold the current location in a list of unnamed parameters. t is a data type (i.e. int , double *, etc.) that is the data type of the next argument in the argument list.
|
|
||
Return Value |
va_arg returns a value of the data type specified by t .
|
|
||
Comments |
The stdarg facility provides support for accessing unnamed arguments in functions with variable argument lists. The variable argument macros depend on the data type va_list (typedef'd from a char *), defined in stdarg.h, a variable of which may be used to step through the unnamed arguments.
|
|
||
See Also |
|
|
||
Example |
|
|
||
|
|