C
Henry Spencer
henry at utzoo.uucp
Wed Mar 1 03:05:04 AEST 1989
In article <9501 at bloom-beacon.MIT.EDU> yphotons at athena.mit.edu (Sun Warrior) writes:
>I would like to know how to set an array (float) to a certain size...
>... I would first like to be able to type in the size and
>then set the array...
You can't. With certain (unhelpful) exceptions, the dimensions of C arrays
must be constants. You can get much the same effect using malloc() and
pointers, although it is more complicated.
--
The Earth is our mother; | Henry Spencer at U of Toronto Zoology
our nine months are up. | uunet!attcan!utzoo!henry henry at zoo.toronto.edu
More information about the Comp.lang.c
mailing list