int **Matrix_B1;
Matrix_B1 = (int**)malloc(RowB*(sizeof(int*)));
for (int p=0; p<RowB; p++)
{
Matrix_B1[p] = (int*)malloc(ColumnB*(sizeof(int)));
}
How do I create a function to perform dynamic memory allocation in c ?
I have lots of matrices like this and I don't want to keep writing the same thing.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…