DESPERATE! Reading a Matrix from a .txt file

Solved
Last edited on
If you are not allowed to use static size matrix you should use dynamic array( matrix). I believe there are a lot of examples in Internet.
this is a bugint A[m][n];. Compiler is not allowed to initialize like this
Thanks

I figured out that I needed to declare int n= 5; at the beginning and then double A[n][2*n]; to do what needed doing. Thanks.
You determine IN is invalid and then you keep right on using it anyway. Also you try and use it illegally:

IN >> "Cannot open file.\n";
Deleting your post after you get an answer is a jerk move.

Please do not do that in the future.
Topic archived. No new replies allowed.