I have an integer 2d matrix NUMI and a 3d double matrix called PROB
.
Here the 2 allocation:
int main ( int argc, char* argv[]){
double ***PROB;
int **NUMI;
NUMI = (int **)malloc((dim)*sizeof(int *));
PROB = (double ***)malloc((dim)*sizeof(double**));
...
for( i = 0; i < n ; i++){
PROB[ACT][ACTSTART][i] = value;
NUMI[i][i]= value2;
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…