struct matrix {
int col, row;
double data[1]; // I want the matrix entries stored
// right after this struct}matrix* allocate_matrix(int row, int col) {
matrix* m = malloc(sizeof(matrix) + sizeof(double) * (row * col - 1));
m->row = row; m->col = col;
return m;}
阿晨1998
红糖糍粑
随时随地看视频慕课网APP
相关分类