Two dim float malloc
====================
float ** PC;
PC = (float**) malloc(DIM_PC_X * sizeof(float*)); // [DIM_PC_X][DIM_PC_Y];
for(int i = 0; i < DIM_PC_X; i++)
PC[i] = (float*) malloc(DIM_PC_Y * sizeof(float));
Two dim float using new
============================
int sizeX=5,sizeY = 2;
int** ary = new int*[sizeX];
for(int i = 0; i < sizeX; ++i)
ary[i] = new int[sizeY];
Comments
Post a Comment