Bidimensional dynamic array problem

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue Mar 6 08:02:14 PST 2007


Frits van Bommel wrote:
> orgoton wrote:
> 
>> ulong m;
>> foreach (Vertex[] strip; vData)
> 
> (this loop doesn't require 'inout' since the array itself isn't 
> modified, just the data it references)

Sorry, that's not right. Not even the data is modified, just the data 
referenced *by* the data...

>> {
>>       foreach (Vertex vertex; strip)
> 
> foreach(inout Vertex vertex; strip)
> (or: foreach(inout vertex; strip))
> 
>>       {
>>            file.read(vertex.height);
>>            m++;
>>       }
>> }


More information about the Digitalmars-d-learn mailing list