P
puzzlecracker
Say you have a class:
stuct Updater{
int _v1;
int _v2
int _v3;
update(int v1, int v2, int v2);
bool isBad(int val);
};
Each time update is called, you want to update all the members
respectively, However, if you one of the v's is bad, you try other
vals, if they are good, to update it.
Say v1 is bad, then you try set it to v2, if v2 is bad, then you set
it v3, otherwise, you set it to 0.
The same for v2, and v3 respectively.
Thanks
stuct Updater{
int _v1;
int _v2
int _v3;
update(int v1, int v2, int v2);
bool isBad(int val);
};
Each time update is called, you want to update all the members
respectively, However, if you one of the v's is bad, you try other
vals, if they are good, to update it.
Say v1 is bad, then you try set it to v2, if v2 is bad, then you set
it v3, otherwise, you set it to 0.
The same for v2, and v3 respectively.
Thanks