How to initializing an array of strings?

Bill Baxter dnewsgroup at billbaxter.com
Mon Oct 30 23:56:30 PST 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



More information about the Digitalmars-d-learn mailing list