I am trying to write a function to print std list in C++. Is it true that for template function, T cannot be used as template argument?
template <typename T>
void printlist(list<T> a)
{
list<T>::iterator i;
for (i=a.begin(); i!=a.end(); ++i)
cout<<*i<<" ";
}