I have a method that takes an object as an argument.
Both the caller and argument have the same members (they are instances of the same class).
In the method, particular members are compared and then, based on this comparison, one member of the argument object needs to be manipulated :
class Object {
// members
public:
someMethod (object other) {
int result;
member1 - other.member1 = result;
other.member2 = other.member2 - result;
}
The only thing is that it doesn't actually change other.member2 out of this scope, and the change needs to be permanent.
So yes, sorry: I need advice on pointers... I have looked online and in books, but I can't get it working. I figure one of you will look at this and know the answer in about 30 seconds. I have RFTM and am at a stupid loss. I am not encouraging.
Thanks everyone!