home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!warwick!coventry!champion
- From: champion@cch.coventry.ac.uk (Alun)
- Newsgroups: comp.lang.c
- Subject: Re: Need help with string arrays
- Message-ID: <C0DnM0.5ux@cck.coventry.ac.uk>
- Date: 5 Jan 93 10:53:57 GMT
- References: <1992Dec27.232512.22474@news.ysu.edu> <C0DLwq.n3@cck.coventry.ac.uk>
- Sender: news@cck.coventry.ac.uk (news user)
- Organization: Coventry University, Coventry, UK.
- Lines: 28
- Nntp-Posting-Host: cc_sysh
-
- In article <C0DLwq.n3@cck.coventry.ac.uk> champion@cch.coventry.ac.uk (Alun) writes:
- ~
- ~No you are not declaring it correctly.
- ~char names[][5];
- ~/* Declares an array of 5 (from 0 to 4) arrays of characters */
-
- Okay before someone tells me I got it wrong - I KNOW.
-
- Sorry what I should of said
-
- char names[][5];
- /* Declares an array of arrays of 5 (from 0 to 4) characters */
-
- What you require is
- char *names[5];
-
- Just shows how long it is since I used arrays of arrays.
-
- I believe the correct way of reading c declarations
- is from the inside out first to the right then to the left.
-
- -Alun
-
- --
- *I'm as bad as the worst - but thank God(?) I am as good as the best.*
- *People who think they know everything annoy those of us that do.*
- A.Champion | That's an interesting point, in the sense of
- (champion@uk.ac.cov.cch) | being very not interesting at all. - The Liar
-