Score Prefix Increment (operator++)
easyQuestion 66You are tracking points in a game.
Create a class Score with a private int points.
Requirements:
1) Constructor Score(int p)
2) int getPoints() const
3) Overload PREFIX operator++ to add 1 point and return *this
Do NOT write a main function.
Expected output
11 0
= newline. The output ends with a newline, so print one after the last line.
Hints3 available
Sign in to use hintsTopics
ClassesOperator Overloading
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.