Hi I am trying to assign 5 people various objectives between day0 and day13. However the output is not correct and goes fuzzy in the second half of the output. This is my code:
for(int x=1, y=0; y < 5, x < 15; x++, y++)
{
array[x][y] = objectives[y];
if (y == 4)
{
y = 0;
continue;
}
}
What I am trying to do is go through the y array with the x array simultaneously, but when I reach the end of y (i.e. y==4) I want to reset y (i.e. y=0) but continue x from where it was previously (i.e. in the first case x=5 and y =0; y++,x++)
This is how I am printing out:
for(int y=0; y<5; y++)
{
for(int x=0; x<15; x++)
{
cout<<array[x][y];
cout << '\t';
}
cout<<endl;
}