>i dont know how to implement accessor and mutator functions.
Accessor and mutator are just fancy terms for a function that gives you the value of a member and a function that sets the value of a member:
class test {
int member;
public:
int accessor() { return member; }
void mutator(int value) { member = value; }
};
>and how to overload a constructor.
Just write another one that doesn't take the same type and number of arguments as any of the others.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004