Question: in c++ Q7: Continue with Integer class: a) Copy the previous program to a new file. b) Overload the postfix -- operators, so return a

Q7: Continue with Integer class: a) Copy the previous program to a new file. b) Overload the postfix -- operators, so return a Word object with remove last character of value. c) Overload the pretfix -- operators, so return a Word object with remove first character of value. d) Overload the subscript i operator, terminate program if index is bigger or equal than size. Return i-th character based on the given index. Class template (complete following function): class Wordt friend Word operator-//postix friend Word operator-//preffix char& operator] } Use following main() to test your class. int main() { Word a("abc"),b; cout Answer: 7 CO 10 2.cpp 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
