c++ - Difference between (++i) and (i++) -


In C ++ I think that (++ i) is passed to i < / Code> Because operator needs to be added, but which I do not know:

Why should (i ++) return i From the price?

Can anyone explain?

The form of ++ i << code> i Can be written in
  prefix_inc (this) code> is back, we can refer to it, however, looks like  i ++  < / P> 
  postfix_inc (this) {copy of this increase old_th = copy by 1 old old_this}  

as old_this just There is a local variable, the reference is useless i ++ is complete so logically it is a Should give justice.


Comments