Write a program in c++ that overload++ and -- operators
Answers
Answered by
0
Answer:
The postfix increment operator ++ can be overloaded for a class type by declaring a nonmember function operator operator++() with two arguments, the first having class type and the second having type int . Alternatively, you can declare a member function operator operator++() with one argument having type int .
Similar questions