I'm trying to use the ternary operator to do the following:
int nRetValue;
// Do some stuff
(nRetValue == 1) ? MyCt1++ : MyCt2++;
This doesn't work, why?
(I want to increment MyCt1 if nRetValue == 1, otherwise increment MyCt2)
I know how to do it with if (...) ... but shouldn't this work?
Start Free Trial