AuthorMessage
jackel
n00b
Posts: 41

aight troops got a small question can sumbody explain the  i++ in this for loop & what its definition is here is for loop: for (int i = 0; i < 100; i++) I know i is = to 0 and 0 is lesser than 100 so we loop again till we reach the number 100 where loop will stop when it reaches
Confused100 but i still dont get what the i++ bit does in this loop.   :?
Any help appreciated guys im sure there is a v-simple solution to this
R€€SP3CT
Jackel ;)
Meka][Meka
Unstopable
Posts: 700

i have altredy answered this q
i++
=
i = i + 1
Ashura
Unstopable
Posts: 370

i=0 is the start i<100 is the condition and i++ is what makes it does every iteration loop  :roll:
or something like the loop starts with initialization that i start with value 0.  every time loop iteration starts condition is evaluated what is i to be less than 100 , if thats true it continues. after the loop iteration is complete, this incrementor code(i++ or i+1) will be executed. this will continue till i is equal to or greater than 100, so the code block will be executed for i values of 1 to 99.
duno if this explain u, i saw most in my book what is in bulgarian and tried to translate it somehow >.<
ps: u can correct me if im wrong thats what i understood from the whole calculating
jackel
n00b
Posts: 41

y0 meka & ashura thats all i needed was just a little pointer in right direction i = i +1 i++
yeah if i = 0 i is < lesser than 100 , so its adding 1 on every time & loops again till reaches 100
R€€SP€CT COMING AT YOU`s  >.<  It`s good to get sum help TIA
 THX the more definitions & examples i see the more im learning so thx alot guysNgals i appreciate everything you`s have done for me & wont be too long now till me is back in hub.
I will be back in hub as soon as i can help with C & JAVA < --- > i was surprisedn & unaware how much JAVA is similar to C in a way , soon i will master C & JAVA
tc all & il c you`s in hub soon >.<
your freind J@C