Function With Variable Arguments
To define a function with a variable number of arguments. One solution is to use the cstdarg header file. There are four parts needed:
va_list, stores the list of arguments,va_start, initializes the argument list,va_arg, returns the next argument in the list,va_end, cleans up the variable argument list.
Whenever a …