I have the following class(prototipe):
class Token { public: //members, etc. friend std::stringstream& operator<< (std::stringstream &o
std::stringstream & operator<< (std::stringstream &out, Token &t)
should be
std::ostream & operator<< (std::ostream &out, Token const &t)