Okey, here's an example with variadics. Of course, that's not ever the best way, in fact, it's absolutely bad practice but I was just playing with.
So, if you are interested in what this guy did? go ahead if not and you want to learn and even use
some of my ideas, don't try it.
Being weighed, this is not a good example, just take it for fun.
Output:
Showing posts with label Variadic templates. Show all posts
Showing posts with label Variadic templates. Show all posts
Thursday, March 29, 2012
Wednesday, March 28, 2012
Variadic templates
Every time, every time, C++ surprise me. Today, with variadic templates that allow us to specifier an unknown number of arguments. And this becomes an completely useful tool.
At the moment, I won't explain it because still being a mystery for me. Just say that this allow recursion
like prolog. Moreover, we can make containers of different types and even very things that I don't know.
Here's my example:
Output:
At the moment, I won't explain it because still being a mystery for me. Just say that this allow recursion
like prolog. Moreover, we can make containers of different types and even very things that I don't know.
Here's my example:
Output:
Subscribe to:
Posts (Atom)