A new instance of a variable?

Ish via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 13 07:48:59 PST 2015


foreach (i; 0..5) {
   immutable int j = i;
   etc.
}
I want each j to be assigned separate memory so that it can be 
passed to a calle function and not overwritten by next value of i 
in foreach()??




More information about the Digitalmars-d-learn mailing list