home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19244 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.3 KB  |  41 lines

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!warwick!coventry!champion
  2. From: champion@cch.coventry.ac.uk (Alun)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Need help with string arrays
  5. Message-ID: <C0DnM0.5ux@cck.coventry.ac.uk>
  6. Date: 5 Jan 93 10:53:57 GMT
  7. References: <1992Dec27.232512.22474@news.ysu.edu> <C0DLwq.n3@cck.coventry.ac.uk>
  8. Sender: news@cck.coventry.ac.uk (news user)
  9. Organization: Coventry University, Coventry, UK.
  10. Lines: 28
  11. Nntp-Posting-Host: cc_sysh
  12.  
  13. In article <C0DLwq.n3@cck.coventry.ac.uk> champion@cch.coventry.ac.uk (Alun) writes:
  14. ~
  15. ~No you are not declaring it correctly.
  16. ~char names[][5];
  17. ~/* Declares an array of 5 (from 0 to 4) arrays of characters */
  18.  
  19. Okay before someone tells me I got it wrong - I KNOW.
  20.  
  21. Sorry what I should of said
  22.  
  23. char names[][5];
  24. /* Declares an array of arrays of 5 (from 0 to 4) characters */
  25.  
  26. What you require is
  27. char *names[5];
  28.  
  29. Just shows how long it is since I used arrays of arrays.
  30.  
  31. I believe the correct way of reading c declarations
  32. is from the inside out first to the right then to the left.
  33.  
  34.   -Alun
  35.   
  36. -- 
  37.   *I'm as bad as the worst - but thank God(?) I am as good as the best.*
  38.     *People who think they know everything annoy those of us that do.*
  39. A.Champion                |  That's an interesting point, in the sense of
  40. (champion@uk.ac.cov.cch)  |    being very not interesting at all. - The Liar
  41.