Arrays of pointers
Anthony Shipman
als at bohra.cpg.oz
Tue May 29 19:36:36 AEST 1990
In article <009375FB.7DA0D5C0 at rigel.efd.lth.se>, e89hse at rigel.efd.lth.se writes:
> In article <1990May28.145851.2407 at cs.utk.edu>, wozniak at utkux1.utk.edu (Bryon Lape) writes:
> > What I need to know is how to have a dynamic length array of
> >fixed length character strings. Basically, I need an array of strings
> >14 characters long. I tried
> > char *array[14]
> >but this sets up an array for variable length strings (14 array
> >elements). what I need is the opposite. Any ideas?
>
> Try with:
> char (*array)[14];
> or maybe even
> char (*array)[14+1];
>
> Henrik Sandell
How does this sound?
typedef char string14[14];
string14 *list;
or
string14 list[] = {....};
At least this way I don't have to worry about precedence in type declarations.
--
Anthony Shipman ACSnet: als at bohra.cpg.oz.au
Computer Power Group
9th Flr, 616 St. Kilda Rd.,
St. Kilda, Melbourne, Australia
D
More information about the Comp.lang.c
mailing list