I'm reading from a file that has a 3x3 matrix such as:
1.0 2.0 3.0
4.0 5.0 6.0
7.0 8.0 9.0
and I'm trying to allocate memory and re-print the same matrix as it is given back to the prompt? I'm not sure exactly how to do that. The numbers can hold negative values as well. I know memory is laid out linearly so even a 2D matrix can still be viewed as a 1D. I need to store it so that later I can actually call specific i,j elements. Thank you.