Rules for overloading an operator:The operator being overloaded should have at least one operand of a user-defined data type.Overloaded operators must either be a member function or a friend function of the class.Overloaded operators must follow the same syntax and precedence rules as the built-in operators.Overloaded operators cannot change the number of operands, their types, or their intrinsic meanings.Some operators, such as the conditional and the...
Showing posts with label Rules for overloading an operator. Show all posts
Showing posts with label Rules for overloading an operator. Show all posts