Here\'s the deal. I have a static class which contains several static functions used for getting input. The class contains a private static member variable for indicating wh
Your code looks fine to me. And ideone
agrees: see this link. But that's with gcc-4.3.4. However, my gcc-4.4.0 doesn't accept it. So whatever the reason, it's not obvious.
Edited to add: The following variant compiles under gcc-4.4.0:
int localStatus = 42 ? GOOD : BAD;
Reminder: the following code doesn't compile:
int localStatus = (num == 42) ? GOOD : BAD;
So somebody has screwed up somewhere.