2.10.4 va_end Declaration: void va_end(va_list ap); Allows a function with variable arguments which used the va_start macro to return. If va_end is not called before returning from the function, the result is undefined. The variable argument list ap may no longer be used after a call to va_end without a call to va_start. Example: #include<stdarg.h> #include<stdio.h> void sum(char *, int, …); int main(void) { sum(“The […]
Category: stdarg.h
va_arg
2.10.3 va_arg Declaration: type va_arg(va_list ap, type); Expands to the next argument in the paramater list of the function with type type. Note that ap must be initialized with va_start. If there is no next argument, then the result is undefined. Faydalı Yetersiz
va_start
2.10.2 va_start Declaration: void va_start(va_list ap, last_arg); Initializes ap for use with the va_arg and va_end macros. last_arg is the last known fixed argument being passed to the function (the argument before the ellipsis). Note that va_start must be called before using va_arg and va_end. Faydalı Yetersiz
Değişkenler ve Tanımlar
The va_list type is a type suitable for use in accessing the arguments of a function with the stdarg macros. A function of variable arguments is defined with the ellipsis (,…) at the end of the parameter list. Faydalı Yetersiz