Function that accepts variable arguments of different datatypes in c++
<p>I have been searching for this in stackoverflow but i was unable to understand most of the solutions proposed. The problem is that i need to write a function that may accept any datatype and the number of arguments to the function also vary..For now i would just like to print those arguments in the function.</p>

<pre><code>void printVariableArgs(){
//print all variables that are passed to this function
}
</code></pre>

<p>Is it possible to do this in c++, If so how is it done?</p>
