头文件:
<stdio.h> and <stdarg.h>
1. va_list
typedef for pointer to list of arguments defined in STDIO.H
2.void va_start( va_list arg_ptr, prev_param );
Macro to set arg_ptr to beginning of list of optional arguments
3. void va_end( va_list arg_ptr );
Macro to reset arg_ptr
4. type va_arg( va_list arg_ptr, type );
va_arg retrieves a value of type from the location given by arg_ptr and increments arg_ptr to point to the next argument in the list, using the size of type to determine where the next argument starts
5.int vsnprintf(char *buff, size_t size, const char *format, va_list ap);
Each of these functions takes a pointer to an argument list, then formats and writes the given data to the memory pointed to by buffer.