The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.
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. (6)
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. (6)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.