how to iterate on Array?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 28 03:16:45 PDT 2015


On Saturday, 27 June 2015 at 17:43:13 UTC, aki wrote:
> But when I compile it by DMD 2.062 on Windows
> it says:
>
> testArray.d(5): Error: cannot infer argument types
> (line 5 is at "foreach(i, v; a[]) {" )

2.062 is really ancient, we're about to release 2.068 soon. 
Consider upgrading, because there have been tons of bugfixes 
since your version.

On current DMD, the error message is slightly clearer:

"Error: cannot infer argument types, expected 1 argument, not 2"


More information about the Digitalmars-d-learn mailing list