• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
a c question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a c question


  • Subject: a c question
  • From: Robert Dell <email@hidden>
  • Date: Tue, 07 Feb 2006 06:29:00 -0500

i know it MUST be shown someplace but i can't find it at the moment...

my end project is a web access log checker and counter/sorter.

the basic question I need answered is how do i implement open ended arrays?  that is an array that does not have any upper limits, more items can be added as time goes on.

usually you'd do something like this

struct expskill
{
  char     skillname[80];
  long     skillvalue;
  long     skillreqs;
  long     skillNeeded;
  long     skillexclude;
} myarmor[8], myweapon[25], mymagic[5], mysurvival[15], mylore[13], myinstruments[5], swap;

in this case "myarmor" has a set 8 slots in it.  what should happen if I wanted 9 slots later instead of 8?  how would I add a record to the array?

does this make any sense at all to you?



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: a c question
      • From: Andy Armstrong <email@hidden>
    • Re: a c question
      • From: Nils Holland <email@hidden>
  • Prev by Date: Searching for socket API thread based
  • Next by Date: Re: a c question
  • Previous by thread: Re: Searching for socket API thread based
  • Next by thread: Re: a c question
  • Index(es):
    • Date
    • Thread