Box It!

  • + 8 comments

    To overload operator <<, I use the following code

    ostream& operator<<(ostream& out, const Box& B){ return out << B.l << " " << B.b << " " << B.h; }

    But the system says "std::ostream& Box::operator<<(std::ostream&, const Box&)’ must take exactly one argument". Can anyone help me with this problem? Thanks in advance.