Posted-Date: Sun, 2 Mar 1997 09:40:30 -0600 (CST) Message-Id: <199703021540.JAA06233@mail.texoma.net> From: "Mark S. Teel" To: "Iain Buchanan" Cc: "DJGPP" Subject: Re: DJGPP Structs Date: Sun, 2 Mar 1997 09:43:20 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit >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