reading file byLine

Namal via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 3 15:21:55 PDT 2015


>
> ep18.d(10): Error: no property 'split' for type 'char[]'
> /usr/include/dmd/phobos/std/algorithm.d(427):        
> instantiated from here: MapResult!(__lambda1, ByLine!(char, 
> char))
> ep18.d(10):        instantiated from here: map!(ByLine!(char, 
> char))
>
> and then a long list to the end of my code
>  Error: undefined identifier a

Hmm, seems I forgot to add std.string, now it works, but words 
seems not to be an array, at least I cannot access it like an 
array. words[0][0] leads to

  Error: no [] operator overload for type MapResult!(__lambda1, 
ByLine!(char, char))

So is is a map? How can I convert all the elements in it to 
integer and store it in a real array?


More information about the Digitalmars-d-learn mailing list