We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Box It!
You are viewing a single comment's thread. Return to all 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.