How to count the no of arguments passed to the function in following program:
#include
#include
void varfun(int i, ...);
int m
Appending or NULL at the end makes it possible for me to have any number of arguments and not worry about it going out of the stack
#include
template
inline void variadic_fun1(_Ty param1,...)
{
va_list arg1;
//TO_DO
va_end(arg1);
}
template
void variadic_fun2(_Ty param1,...)
{
va_list arg1;
va_start(arg1, param1);
variadic_fun1(param1, arg1, 0);
va_end(arg1);
}