by breadbox · 9y ago · 0 comments
- In a bare expression, with only the variable: `i++;` (That's what usually goes into `for`.)
- In a simple assignment, without any extra expression: `int a = b++;`
- While updating an array index that appears nowhere else: `v[i++] = 0;`
Using it anywhere else is asking for trouble. In C++, using the last one is also asking for trouble.
C is too old for its creators to know that, given that it's the language where people got to learn that. But no newer language should carry them.