"infinite" amount of params like printf... how to?

How do I make a function with an unspecified amount of parameters... like printf does()?

In C++11 you can use variadic templates. The advantages with this approach is that it is more type safe and it's possible to verify that the number of arguments is correct.

Look at the printf example.
Last edited on
Topic archived. No new replies allowed.