Thread overview | |||||
---|---|---|---|---|---|
|
October 31, 2006 How to initializing an array of strings? | ||||
---|---|---|---|---|
| ||||
How does one do this? char[][] words = ["a", "list", "of", "some", "words"]; --bb |
October 31, 2006 Re: How to initializing an array of strings? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | 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 Re: How to initializing an array of strings? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Granberg | 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
|
Copyright © 1999-2021 by the D Language Foundation