On Sat, 6 Dec 1997, Chuck Reed wrote:
> Umm, you are really confusing me. Daniel sent a letter saying that to have
> an array of strings, I needed this:
>
> char *abil_desc_parse[] = {
> "This is one string.",
> "This is another string.",
> "This is the last one."
> };
>
> And this is what I already had:
>
> char *abil_desc_parse = {
> "blah blah blah blah blah \r\n
> blah blah blah blah blah\r\n",
> "\0"
> };
>
The crucial difference is not inside the curly brackets, its that
char *abil_desc_parse is not the smae as char *abil_desc_parse[].
In C, an array is the same as a pointer, so that
char *abil_desc_parse[] == char **abil_desc_parse
that is char *abil_desc_parse is a string, but
char *abil_desc_parse[] is a pointer to an array of strings, which is
what you want.
HTH
-Hans
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST