Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
xecute3776yWont You get a compilation error for a dangling +. That's always a binary operator right ? Unlike -
-
@AlpineLinnix looks a mess but it ran without compilation error... ur answer was wrong though. :D
-
@GiddyNaya if gcc will compile that, it's because you changed it. Ignoring the fact that you omitted the braces for the while, stacking prefix increments shouldn't work. If it does, then gcc is being nice to you, as is default. Gcc won't be an asshole about it unless you request it.
Other possible explanation, which also covers why while has an odd number of '-':
It's negative signs. Negative -5, is just 5, which is when negating and decrementing becomes blurred.
Bottom lines:
1) we aren't here to solve homework, which assumedly this is.
2) if it doesn't compile with "-Wall -Werror --pedantic" then kindly leave, your code is shit.
Related Rants
The Missed Shot ✦ ✧✦ ✧✦ ✧
question
question and answer
humor
code