i'm writing a program that accept two command line arguments (argv and argc). For each matrix, the first line contains a single integer n which is its dimension; each of the next n lines contains one row of the matrix. My question is: how can i extract the numbers in the input file so i can process it ?
For example, the input file:
3 <--------------------------------------------------- 3x3 MATRIX
3 5 7
1 3 4
0 1 8
5 <---------------------------------------------------5x5 MATRIX
3 45 -1 3 2
6 9 2 1 3
2 -6 4 2 3
2 3 0 0 1
1 1 9 5 7
all other numbers are elements of MATRIX. How can i seperate them? Thanks!
For example, the input file:
3 <--------------------------------------------------- 3x3 MATRIX
3 5 7
1 3 4
0 1 8
5 <---------------------------------------------------5x5 MATRIX
3 45 -1 3 2
6 9 2 1 3
2 -6 4 2 3
2 3 0 0 1
1 1 9 5 7
all other numbers are elements of MATRIX. How can i seperate them? Thanks!
