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.
operator overloads declared in the class assume "this" instead of the Box argument.
What you could do is declre the operator overload function outside of the class, and then add the operator overload function as a "friend" to your class.
Box It!
You are viewing a single comment's thread. Return to all comments →
operator overloads declared in the class assume "this" instead of the Box argument.
What you could do is declre the operator overload function outside of the class, and then add the operator overload function as a "friend" to your class.
class Box(){...
};