cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/09/13:25:55

From: "Andrew Davidson" <andrew AT lemure DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Array question (a little bit newbie)
Date: Tue, 9 Mar 1999 09:49:09 -0000
Organization: Customer of Planet Online
Lines: 48
Message-ID: <7c3ns4$dlj$1@news7.svr.pol.co.uk>
References: <7bllsm$vap$1 AT news5 DOT svr DOT pol DOT co DOT uk> <36E08691 DOT ED519155 AT jps DOT net> <7bqquf$2d$1 AT news6 DOT svr DOT pol DOT co DOT uk> <36E22399 DOT 3B91F063 AT jps DOT net>
NNTP-Posting-Host: modem-78.jolly.dialup.pol.co.uk
X-Trace: news7.svr.pol.co.uk 921002692 14003 62.136.130.206 (9 Mar 1999 18:04:52 GMT)
NNTP-Posting-Date: 9 Mar 1999 18:04:52 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.0810.800
X-Mimeole: Produced By Microsoft MimeOLE V5.00.0810.800
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dennis Yelle <dennis51 AT jps DOT net> wrote in message
news:36E22399 DOT 3B91F063 AT jps DOT net...
>Andrew Davidson wrote:
>>
>> Dennis Yelle <dennis51 AT jps DOT net> wrote in message
>> news:36E08691 DOT ED519155 AT jps DOT net...
>> >Andrew Davidson wrote:
>> I'm using C and the lengths (determined during compilation) should stay
the
>> same. As an example I'm trying for something like the following
structure:
>>
>> char **mylist=
>> {
>> {1,2,3,4},{5,6,},{7,8,9,10,11,12},{etc,etc,etc,etc}
>> }
>>
>> But that fails to compile correctly. It goes on about there being too
many
>> braces or something (not unmatched braces, it's definately not an error
on
>> my part but my lack of understanding that's to blame).
>
>Does this solve your problem?:
>
>#include <stdio.h>
>
>#define etc 87
>
>char mylist[4][6] =
>{
>    {1,2,3,4},{5,6,},{7,8,9,10,11,12},{etc,etc,etc,etc}
>};


It compiles but it doesn't solve my problem. I want to define mylist like:

char mylist[][]=
{
    {1,2,3,4},{5,6,},{7,8,9,10,11,12},{etc,etc,etc,etc}
};

And this it doesn't like. Basically mylist is going to be a bit on the big
size and the thought of havnig to go through and recalculate the array sizes
every time I change something is a bit of a drag really.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019