c++ spaces in operators , what are the rules
问题 Does spaces have any meaning in these expressions: assume: int a = 1; int b = 2; 1) int c = a++ +b; Or, 2) int c = a+ ++b; When I run these two in visual studio, I get different results. Is that the correct behavior, and what does the spec says? In general, what should be evaluated first, post-increment or pre-increment? Edit: I should say that c =a+++b; Does not compile on visual studio. But I think it should. The postfix++ seems to be evaluated first. 回答1: Is that the correct behavior Yes,