Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In C++ the semantics can differ, in that copying an object for post-increment might require a memory allocation internally (for example in the case of a BigInt class), which may fail and throw an exception. For consistency, using pre-increment by default and unless you really need post-increment, is a good habit.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: