Operator precedence for “<<” and “++” in VS2008 with optimization
问题 I'm stuck with a weird VS2008 C++ issue, that looks like operator precedence is not respected. My question is what is the output of this: int i = 0; std::cout << ((i != 0) ? "Not zero " : "zero ") << ++i << std::endl; Normally the ++ has precedence over the << , right? Or is the << considered like a function call giving it a higher precedence than the ++ ? What is the 100% correct standard answer to this? To check, I created a new empty project (VS2008 console app), pasted only this code in