Hello i want to use the function getscore() from the following and keep on adding 50 point to the score how can i do it. And please give a coded example. thankyou
class Turn {
char m_turn;
int m_score;
public:
Turn(const char c = '\0', const int s = 0) : m_turn(c), m_score(s) {}
char getTurn() const { return m_turn; }
int getScore() const { return m_score; }
friend bool operator<(const Turn& lhs, const Turn& rhs) {
return lhs.m_score < rhs.m_score;
}
friend ostream& operator<<(ostream& o, const Turn& t) {
return o << "\t--> (" << t.m_turn << ") with score " << t.m_score;
}
};