Thread overview
How to initializing an array of strings?
Oct 31, 2006
Bill Baxter
Oct 31, 2006
Johan Granberg
Oct 31, 2006
Bill Baxter
October 31, 2006
How does one do this?

  char[][] words = ["a", "list", "of", "some", "words"];

--bb
October 31, 2006
Bill Baxter wrote:

> How does one do this?
> 
>    char[][] words = ["a", "list", "of", "some", "words"];
> 
> --bb

I don't have a compiler here but have you tried this.

char[][] words = ["a"[], "list", "of", "some", "words"][];
October 31, 2006
Johan Granberg wrote:
> Bill Baxter wrote:
> 
>> How does one do this?
>>
>>    char[][] words = ["a", "list", "of", "some", "words"];
>>
>> --bb
> 
> I don't have a compiler here but have you tried this.
> 
> char[][] words = ["a"[], "list", "of", "some", "words"][];

Thanks!  That does it (without the trailing [])

  char[][] words = ["a"[], "list", "of", "some", "words"];

--bb