How does C define matrix?
There are two methods for reference:

1, the simplest is a two-dimensional array, such as storing an all-plastic m*n matrix. Then you can define int a[m][n].

Input or output can be completed by two-layer loop, while the outer control line m, such as for(I = 0;; I & ltm;; ++i), the internal control column n is (j = 0;; j & ltn; ++ j);

2. The second method is to compress the matrix for storage. If you learn the data structure, it should be easier to understand.

Packaging structure, such as:

Step 1: First define the location of valid data.

Typedef structure node

{

Int hangint lieint data; //Row and column values used to store valid data bits.

} node;

Typedef structure matrix

{

node * m; //An array that stores data of all nodes.

Int sum// How many valid data bits are recorded in * * *

} matrix;