Mail Archives: djgpp/1997/03/02/10:50:46
>I've got a structure as follows:
>struct defPt
>{
> float x, y, z;
> int sx, sy;
>};
>And an array full of pointers to such structres:
>defPt *View[25][25];
Note: this is a 25X25 array of pointers of type (struct defPt *)...
>When I try and do this.... ("x" and "y" are of type int, and each go from
>0-24)
>defPt *View[x][y] = calloc(1, sizeof(defPt));
This would work:
View[x][y] = calloc(1, sizeof(defPt));
>I get an error message "Error: variable-sized object of type `defPt
>*[1][1]' may not be initialized" I used to use Turbo C and never had any
>problems of this sort - surely the structure is pretty fixed size? I've
>checked through the documentation and could find nothing. Is there any
way
>of making it a "fixed size" rather than "variable size"...
>Why the hell is it changing in size anyway!?
HTH,
MST
- Raw text -