Casting an array form an associative array
    Jacob Carlborg 
    doob at me.com
       
    Sat Nov 10 09:22:50 PST 2012
    
    
  
On 2012-11-10 17:48, Timon Gehr wrote:
> The length of an array is the number of elements. sizeof(void)==1 and
> sizeof(int)==4. The first example reinterprets the ptr and length pair
> of the void[] as a ptr and length pair of an int[]. The second example
> adjusts the length so that the resulting array corresponds to the same
> memory region.
Ok, thanks for the explanation.
-- 
/Jacob Carlborg
    
    
More information about the Digitalmars-d-learn
mailing list