Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++

Name: Anonymous 2011-02-07 22:49

ok, so i am working with a 1D array, and I am saying, ok like array[listSize].

Ok, what is the difference between like array[--listSize] and array[listSize--]?  Do they both work? does one actually modify the value of listSize or do they both leave the value of listSize alone?

Name: Anonymous 2011-02-07 23:14

>[--Variable]
The value is decremented before accessing the array.
>[Variable--]
The value is decremented after accessing the array.

So to answer your question, they both modify it. It just whether they do it before or after.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List