c++ Error : non-member function cannot have cv-qualifier

When I building file: ../src/Tree.h, I got this error:ui

ERROR:../src/Tree.h:22: error: non-member function ‘std::ostream& operator<<(std::ostream&, const Tree&)’ cannot have cv-qualifierthis

REASONS:  use const on a non-member function
spa

 error code: friend ostream& operator<< (ostream& os, const Tree& tree) const;code

right code: friend ostream& operator<< (ostream& os, const Tree& tree);io

相關文章
相關標籤/搜索