//main.cpp #include "matrix.h" int main(int argc, char *argv[]) { const int nrows = 4; const int ncols = 5; Matrix *mat; mat = MatrixCreate(nrows, ncols); for (int i = 0; i < nrows; i++) for(int j = 0; j < ncols; j++) MatrixSetValue(mat, i, j, 1 + j + i * ncols); MatrixPrint(mat); MatrixDestroy(mat); return 0; }