number of columns and lines in my array
I don't understand why my code doesn't display an array of 6 lines and 6 columns as i wish.
My code displays an array with 10 columns and 3 lines.
Than you in advance for the help.
Here is my code :
Code:
void initArray(float largeArray[5][5])
{
for (int x=0; x < 5; x++)
{
for (int y=0; y<5; y++)
{
largeArray[x][y] = 0;
}
}
}
float printOutArray(float largeArray[5][5])
{
for (int x = 0; x < 5; x++)
{
for (int y = 0; y < 5; y++)
{
cout << largeArray [x] [y]<<'\t';
}
}
return largeArray[5][5];
}
int main()
{
float largeArray [5][5];
initArray(largeArray);
printOutArray(largeArray);
}