Variadic Templates example
<p>Consider following code, I don't understand why empty function of print must be defined.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

void print()
{   
}   

    template &lt;typename T, typename... Types&gt;
void print (const T&amp; firstArg, const Types&amp;... args)
{   
    cout &lt;&lt; firstArg &lt;&lt; endl; // print first argument
    print(args...); // call print() for remaining arguments
}

int main()
{   
    int i=1;
    int  j=2;
    char c = 'T';
    print(i,"hello",j,i,c,"word");

}   
</code></pre>