malloc返回一个空指针
我使用C语言,并且我对malloc 有问题
double** matrix = malloc(matrixSize * sizeof(double*));
for (size_t i = 0; i < matrixSize; i++) {
matrix[i] = malloc(matrixSize * sizeof(double));
}
return matrix;
}`
无效*malloc(size_t-size(
所以你必须把这个打成双倍的**
double** matrix = (double**)malloc(matrixSize * sizeof(double*));