|
|
|
|
|
by greggman
3236 days ago
|
|
I'd argue you regardless you should write what you mean If you mean "increment g" then write "++g" If you mean "temp = g; increment g; return g" then write "g++" It doesn't really matter that the compiler may optimize out the "temp". If you're writing "g++" you're indicating you want the value before it's been incremented. |
|