Why `i` not working on foreach loop if it have byLine option

Daniel Kozak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Dec 17 06:21:02 PST 2015


V Thu, 17 Dec 2015 14:09:57 +0000
Suliman via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
napsáno:

> Next code produce error:
> 
>   foreach(i, line;fileContent.byLine)
> 
> Error: cannot infer argument types, expected 1 argument, not 2
> 
> Why it's do not work?

http://dlang.org/phobos/std_range.html#enumerate



More information about the Digitalmars-d-learn mailing list