Date: Thu, 30 Nov 1995 17:17:30 +0000 (GMT) From: Andy Molyneux To: "Michael E. Wesolowski" Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Declaring arrays inside generic function On Mon, 27 Nov 1995, Michael E. Wesolowski wrote: > I have a generic function which has as one of its input parameters an int > which identifies an array size. Within the function, I attempt to declare > an array of int's: > > int item_count [array_size]; > In ANSI C, it's not possible to declare an array of variable size - it should be a "constant" expression. However, one of gcc's extensions to ANSI C allows you to do this (if you don't specify the -ansi option). That's what I know anyway; hope it helps you with your problem. - Andy | Andrew Molyneux Internet: molyneua AT cs DOT man DOT ac DOT uk | University of Manchester Tel : (+44)161-485-3291 | REAL programmers write a=b!=4?b%2?c:d:e without even | thinking about it :-)