Nov 20, 2015 at 4:32am UTC
@dgadk
To learn how to create an array of user defined dimensions,
read here..
As for this..
1 2 3 4 5 6 7
for ( int n=0; n<5; n++)
{
inputFile >> square[ROW][COL];
ROW++;
COL++;
cout << "\n" << square[ROW][COL];
}
You're not going to see what was inputted, as you are showing the next array's location by putting the ROW++ and COL++, before the cout.
Last edited on Nov 20, 2015 at 4:32am UTC
Nov 22, 2015 at 11:38pm UTC
Here's what I have now:
Not getting it to:
a) read only one matrice
b) read the right values into the 2darray
Any and all tips, thoughts, etc are appreciated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
inputFile >> m;
cout << "m= " << m;
for (i=0; i < (m*m); i++)
{
for (ROW=0; ROW < m; ROW++)
{
for (COL=0; COL < m; COL++)
{
inputFile >> square[ROW][COL];
cout << "\narray: " << square[ROW][COL];
}
}
}
Last edited on Nov 23, 2015 at 2:26am UTC