您的位置:首页 > 其它

函数不定量的参数问题

2008-02-19 16:46 204 查看
头文件:

<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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: