Explicit conversion needed to go from array to pointer??

Stewart Gordon smjg_1998 at yahoo.com
Thu Feb 22 06:57:09 PST 2007


Henrik Harmsen Wrote:
<snip>
> Deprecated in what way? Made illegal or obsolete or..?

Effectively, obsolete but not yet illegal.  Code that uses deprecated features can still be compiled using the -d compiler option.

> Can I use an explicit cast? Will it work?
> 
> Like this:
> p = cast(int*)s;	// p points to the first element of the array s.
> ?

You could, but perhaps nicer is to just use the .ptr property.

Stewart.



More information about the Digitalmars-d mailing list