Problem 17
What is returned by the function that overloads the operator >> for a class?
Problem 19
What is the purpose of a dummy parameter in a function that overloads the post-increment or post-decrement operator for a class?
Problem 20
What type of value should be returned by a function that overloads a relational operator?
Problem 21
How many parameters are required to overload the pre-increment operator for a class as a member function?
Problem 22
How many parameters are required to overload the pre-increment operator for a class as a friend function?
Problem 23
How many parameters are required to overload the post-increment operator for a class as a member function?
Problem 24
How many parameters are required to overload the post-increment operator for a class as a friend function?
Problem 28
Consider the following declaration:
template
Problem 31
Write the definition of the function template that swaps the contents of two variables.
Problem 32
a. Overload the operator + for the class newString to perform string concatenation. For example, if s1 is "Hello " and s2 is "there", the statement: s3 = s1 + s2; should assign "Hello there" to s3, in which s1, s2, and s3 are newString objects. b. Overload the operator += for the class newString to perform the following string concatenation. Suppose that s1 is "Hello " and s2 is "there". Then, the statement: s1 += s2; should assign "Hello there" to s1, in which s1 and s2 are newString objects.