On Fri, Feb 24, 2012 at 08:34:19PM +0100, simendsjo wrote:
>     char[] a;
>     auto b = cast(void*)a;
>     auto c = cast(char[])b; // Error: e2ir: cannot cast b of type
> void* to type char[]

D arrays are not the same as C arrays. D arrays also include length in
addition to the pointer, so you can't just cast a void* to an array.


T

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it. -- Brian W. Kernighan

Reply via email to