Question: Write a C++ program that substitutes an overloaded += operator for the overloaded + operator. This operator should allow statements like s1 += s2; where
Write a C++ program that substitutes an overloaded += operator for the overloaded + operator. This operator should allow statements like s1 += s2; where s2 is added (concatenated) to s1 and the result is left in s1. The operator should also permit the results of the operation to be used in other calculations, as in s3 = s1 += s2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
