array to pointer conversion
mario.pernici at mi.infn.it
Sun Feb 11 09:52:42 PST 2007
the following example does not compile with dmd 1.05:
for(int i=0; i < 3; i++) s[i] = i;
p = s;
bug1.d(6): Error: cannot implicitly convert expression (s) of type int to int*
while it seems it should according to the spec (Array Declaration).
It used to work in some previous version of dmd.
The following works with dmd 1.05:
p = cast(int*) s;
More information about the Digitalmars-d-learn