Variadic functions
From cppreference.com
< c
Variadic functions are functions (e.g. printf) which take a variable number of arguments.
The declaration of a variadic function uses an ellipsis as the last parameter, e.g. int printf(const char* format, ...);. See variadic arguments for additional detail on the syntax and automatic argument conversions.
Accessing the variadic arguments from the function body uses the following library facilities:
Macros | |
Defined in header
<stdarg.h> | |
enables access to variadic function arguments (function macro) | |
accesses the next variadic function argument (function macro) | |
(C99) |
makes a copy of the variadic function arguments (function macro) |
ends traversal of the variadic function arguments (function macro) | |
Type | |
holds the information needed by va_start, va_arg, va_end, and va_copy (typedef) |