not fixed variables

please help me with this i need some help

Suppose we have the function that is used to print variables to your computer screen. Type of variables are unknown and the number of variables is not fixed, it can be two or three. Write a c program using function template to solve this problem.
See variadic templates:

http://www.cplusplus.com/articles/EhvU7k9E/

http://en.cppreference.com/w/cpp/language/parameter_pack

Especially the example with recursive call.
Write a c program using function template to solve this problem.

C doesn't have function templates.

Either you write it in C++ using variadic templates as coder777 suggested.

Or you write it in C using va_list, va_args, etc. from the stdarg.h header.
http://en.cppreference.com/w/c/variadic
Topic archived. No new replies allowed.