Xref: utzoo comp.lang.c:29169 comp.std.c:3119 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!munnari.oz.au!ditmela!yarra!bohra!als From: als@bohra.cpg.oz (Anthony Shipman) Newsgroups: comp.lang.c,comp.std.c Subject: Re: Arrays of pointers Message-ID: <110@bohra.cpg.oz> Date: 29 May 90 09:36:36 GMT References: <1990May28.145851.2407@cs.utk.edu> <009375FB.7DA0D5C0@rigel.efd.lth.se> Organization: Computer Power Group, Melb, Australia Lines: 30 In article <009375FB.7DA0D5C0@rigel.efd.lth.se>, e89hse@rigel.efd.lth.se writes: > In article <1990May28.145851.2407@cs.utk.edu>, wozniak@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@bohra.cpg.oz.au Computer Power Group 9th Flr, 616 St. Kilda Rd., St. Kilda, Melbourne, Australia D