I am new to C++ programming, you might think its silly question but I tried everything. I want to allocate a memory using malloc for three dimensional array.
I dont want to use pointers. I want size to be fixed.
float xyz[60000][28][28];
xyz = (float ***) malloc(60000 * sizeof(float ***));
for(int i=0; i<60000; i++)
{
xyz[i]=(float **)malloc(28 * sizeof(float *));
for(int j=0; j<28; j++)
{
xyz[i][j]=(float *)malloc(28 * sizeof(float));
}
}
I tried above code, but its giving me error. Incompatible types.
Any kind of suggestions are welcomed.