Home Segments Index Top Previous Next

547: Mainline

There are occasions when you have to hand a class object to a member function as an ordinary argument, rather than via the class-pointer operator or the class-member operator.

For example, if you want to define a function that takes two class-object arguments, only one, at most, can be delivered via the class-pointer operator or the class-member operator.

Also, if you want to overload an operator, such as the output operator, you are restrained, because operator operands cannot be delivered via the class-pointer operator, ->, or via the class-member operator.