Hello all,
I have what is probably a silly question... I want to fill a 2-dimensional array called instantAct with values from another 2-d array called mS.
The two arrays have different dimensions, but they have the same number of values. I want my loop to take values from certain columns (all rows) of mS and put them in instantAct. instantAct will be completely filled.
The problem is that my code is not doing anything... instantAct is remaining empty. I have run cout on mS and there are values in it, and my indexing to get them is correct.
My question is, why is instantAct still empty? Is it NOT possible to use a complicated loop (like my loop for k) to equate two arrays?
I would really appreciate any help.
for ( int i = 0; i < array.NumberOfIntervals(); i++ )
{
for (int j = 0; j < nC; j++)
{
for (int k = (nC * xAg) - nC; k < (nC * xAg); k++)
{
instantAct[ i ][ j ] = mS[ i ][ k ];
}
}
}