Question: What is wrong in the following class definition? class Count { public: int count; Count(int c) { count = c; } Count() { count-
What is wrong in the following class definition? class Count { public: int count; Count(int c) { count = c; } Count() { count- 0; } int getCount() const { return count; } void incrementCount() const { count++; } };
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
Two mistakes 1 declare count as public be direct access in ... View full answer
Get step-by-step solutions from verified subject matter experts
