c++ for_each function
<p>my code is :</p>

<pre><code>void prinT(int variable)
{
    cout&lt;&lt;variable&lt;&lt;" ";
    cout&lt;&lt;endl;
}

..............

vector&lt;int&gt; vec;
vec.push_back(X);
for_each(vec.begin(),vec.end(),prinT);
</code></pre>

<p>and i am trying to write a code which will print any datas(various types_char,int) of vector.</p>

<p>to my mind code should be: </p>

<pre><code>template&lt;typename T_o_v&gt;
void prinT(T_o_v vaiable)
...................
</code></pre>

<p>if you know about this please tell me...(is possibl or not)
thanks.</p>

<p>please tell me is posible or not </p>
