Originally Posted by
tardis_
i want two loops as you see in the code to do exactly what it's doing.
Originally Posted by
tardis_
but when i put in variable at j say 4, then the whole loop will start at 4 not 0.
when i try to reset the variable,
How do you change j to 4? How do you reset the variable? Variables i and j are both locally declared, and the control for both loops are hard coded. If you want to vary the number of times a loop runs you will have to use a variable in place of the hard coded numerical values.
for( int i = iStartValue; i < iStopValue; i++){
for( int j = jStartValue; jStopValue < 8; j++) {
//tasks
}
}
I included variables in your code in place of hard coded values. Using variables in these 4 locations gives you the control of the loops you seem to be wanting. Modify the values of the variables outside the loop before the loop(s) start, and inside the loop(s) as the code executes, to suit your needs.