filling arrays, avoid default init
Lionello Lunesu
lio at lunesu.remove.com
Tue Jan 9 07:20:07 PST 2007
Lionello Lunesu wrote:
> Frank Benoit (keinfarbton) wrote:
>> TypeA[] ta = .... ; // big array with something
>> TypeB[] tb;
>> tb.length = ta.length; // (1)
>> foreach( uint i, TypeA a; ta ){
>> tb[i] = ta[i].getB();
>> }
>>
>> (1) how can I avoid the default initialization?
>>
>> -- Frank
>
> type[] t = void;
Uhm, sorry. That doesn't seem to prevent the initialization at all...
L.
More information about the Digitalmars-d-learn
mailing list