Hello!
Some functions, such as printf() can accept an infinite number of parameters. I looked at the source code, and the part that accepts an infinite number of parameters start with ... in printf()'s parameters.
How would I used that in any function to accept any number of parameters of any type, and process that? To use the parameters, I would need to know how many parameters there are. How do I know that? Help is greatly appreciated.
Thanks!
Unfortunately va_arg, va_list, etc. only work with simple POD types. In C++11 you can use std::initializer_list or variadic templates to pass a variable number of arguments in a more type safe way.