Given the following class:
class counting
{
private:
int countA;
int countB;
int countC;
public:
void setCount(int x);
int getCount();
}
Could you use the same public methods to set and retrieve the count of all 3 private members of this class?
If so How?
If not, Is the only solution, having a setCount and getCount for each private member?
Any better solutions?
Thanks for your time,
Alan



LinkBack URL
About LinkBacks


