Is there any way not to exit a loop until I finsh all the index in that certain loop befor I go to the other one, example I have this code:
[cod]
#include<iostream>
#include <climits>
using namespace std;
int main(){
int c,i,r;
int b[3][1][5]={{0,1,2},{0},{0,1,2,3,4}};
for (c=0;c<5;c++){
r=0;
for( i=0;i<3;i++){// Here I do not want to exit this loop until I go three times on" i"
cout<<b[i][r][c]<<endl;
}
}
return 0;
}
[/code]
To be clearer I want my loop to show [0][0][0] not exit the "i" loop and show[1][0][0]then [2][0][0] after this one it exit and goes to the other loop and becomes[0][0][1],[1][0][1],[2][0][1]and now exit again and so on so in every time the last index is not change unless the loop turn three times.I appreciate the reply and the help.