va_end

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 […]

Daha Fazla

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

Daha Fazla