函数不定量的参数问题

头文件:

<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.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值