Quote Originally Posted by heat89 View Post
I get an error saying:

binary '<<' : no operator found which takes a right-hand operand of type 'Set<T>' (or there is no acceptable conversion).

Can anybody tell me what's wrong with this...
As the compiler tries to tell you. There is no operator << for Set<T>
try something like this

Code:
template <class T> 
ostream & operator << ( ostream & o, const Set<T> & s ) {
    s.printOn(o);
    return o;
}
printOn is not const correct. It should be

Code:
void printOn(ostream & ostr) const {
    ostr << "hey";
}
Kurt