C++ std::stringstream operator<< overloading

后端 未结 1 390
花落未央
花落未央 2021-01-11 17:37

I have the following class(prototipe):

class Token
{
public:
    //members, etc.
    friend std::stringstream& operator<< (std::stringstream &o         


        
1条回答
  •  北海茫月
    2021-01-11 18:18

    std::stringstream & operator<< (std::stringstream &out, Token &t)
    

    should be

    std::ostream & operator<< (std::ostream &out, Token const &t)
    

    0 讨论(0)
提交回复
热议问题