0
Why I obtain the same result if I write: for (i=..; i<..; i++) and for (i=..; i<..; ++i)?
In the for loop of c++ doesn't matter if I write i++ and ++i as increment? Because I obtained the same result even if I thought they were different.
1 Respuesta
+ 4
You will see a difference were you to do:
x=i++; vs. x=++i;
as x would be assigned different values. But, there isn't a difference for:
i++; vs. ++i;
in both cases i ends up increasing by 1.