As the title says I want to overload the << operator with a template class
but keep getting a "does not match any template declaration"
eg. in the .h file
template <class T>
class foo
{
friend ostream & operator<< <T>(ostream &output , foo<T> & F);
}
and in the .cpp file
template <class T>
ostream & operator<< <T>(ostream &output , foo<T> & F)
{
output<<"whatever";
return output;
}
How would I possible do that as I'm still learning to this.