0
Is y=x and y=x++ the same ?
3 Respostas
+ 2
If you look at how y changes, yes!
if you look at how x changes, no!
+ 1
speaking about c++ , no its not .
y=x means the y takes the value of x .
y=x++ ; means y takes the value of x and then add 1 to it.
( sorry poor english language , hope you understood)
+ 1
For y it would be, but for x it wouldn't. Say you have x = 10; if you write y = x, then x would still be 10, but with y = x++, x would be 11 afterwards. y would be 10 in both cases though.