Leon W.

asked • 07/07/14

Which of the following operators must always be overloaded in order to be used on class objects?

Which of the following operators must always be overloaded in order to be used on class objects?
 
The assignment operator =
The address operator &
The modulus operator %
The comma operator ,
 
I'm having trouble answering the question above.  Can anyone help me?

2 Answers By Expert Tutors

By:

Raymond D. answered • 10/02/15

Tutor
5 (2)

Retired, But Enjoy Passing on Math and Computer Knowledge

Leon W.

What about the modulus operator? How is it use in overloading class obects? 
Report

07/08/14

Christopher D.

tutor
It's overloaded in the same was as all the other operators:
 
class N {
    ...
 public:
    N operator%(const N&, const N&);    ...
};
Report

07/09/14

Leon W.

Okay. Thanks Christopher. You are really a big help. 
Report

07/09/14

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.