Quote:
if (dArray[i].getValue() == dArray[j].getValue() == dArray[k].getValue())
The above line is flawed (because
==
either evaluates to
0
or
1
).
It should be
(dArray[i].getValue() == dArray[j].getValue() && dArray[j].getValue() == dArray[k].getValue())
Try, for instance
cout << (5 == 5) << endl;
cout << (5 == 5 == 5) << endl;