RE: Index of array start at 0 problem 05-26-2014, 03:25 PM
#7
(05-26-2014, 03:10 PM)Ex094 Wrote: I think @Deque can help you with this
Im not sure anyone can help him. Maybe I am missing something... but
Code:
i = 0;
while(i<5) {
print City[i];
}Will print
Quote:City[0]
City[1]
City[2]
City[3]
City[4]
Sounds to me like he just wants to start with 1. He's probably declaring i=1 because thats what he's done in pascal for years, and is now getting confused when the arrays are forcing him to start with 0? thats the only reason I can think of for him to suggest that City[i] = i+1??

![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)