I am puzzled by the following:
#include <iostream>
int main()
{
bool a = true;
int nb = 1;
int nb2 = 2;
a ? nb++, nb2++ : nb--, nb2--;
std::cout << " (nb,nb2) = (" << nb << "," << nb2 << ")";
}
Result:
(nb,nb2) = (2,2)
Why is nb2
not equal to 3
?