It seems that you have some allocation errors.
float **map;
int x,z, cnt;
map = (float**)malloc(sizeof(float*) * x );
for (cnt=0;cnt < x; cnt++) {
map[cnt] = (float*)malloc(sizeof(float) * z );
memset (map[cnt], 0, sizeof(float) * z );
}
map[x][z] = value;
This should work in any C Version.
cu.