I created this array of this array inside the function, with the variable MODEL_VERTEX_NUM initialized @runtime, which I think is the braking point here.
loat model_vertices [][]= new float [MODEL_VERTEX_NUM][3];
I got the following errors:
1>.\GLUI_TEMPLATE.cpp(119) : error C2087: 'model_vertices' : missing subscript 1>.\GLUI_TEMPLATE.cpp(119) : error C2440: 'initializing' : cannot convert from 'float (*)[3]' to 'float [][1]'
I understand that when I do this:
float model_vertices *[]= new float [MODEL_VERTEX_NUM][3];
The compiler allows this pass, but I want to understand what is wrong with the previous declaration.
So what happened to the announcement [][] ?
source share