Why is the Final weight Table1 wrtten all in 1 column for everything in the 2nd loop, but final weight talbe 2 is separated into columns per weight (as needed)??? Am puzzled! Code is the same why doesn't it do it for both?
Code:
weightsFile << "Final weights for talbe 1 are: " << endl;
for(int i=0; i<n; i++) // for each row
{
for(int j=0; j<x; j++) // for each element in the row
weightsFile << finalWeightTable1[i][j] << ",";
weightsFile << endl;
}
weightsFile << "Final weights for table 2 are:" << endl;
for(int i=0; i<y; i++)
{
for(int j=0; j<n; j++)
weightsFile << finalWeightTable2[i][j] << ",";
weightsFile << endl;
}