char* vs char[]

jicman jicman at mail.com
Sat Dec 16 21:08:38 PST 2006


== Quote from Jarrett Billingsley (kb3ctd2 at yahoo.com)'s article
> "jicman" <jicman at mail.com> wrote in message
> news:em2fih$1ks5$1 at digitaldaemon.com...
> > How can I fix this?  Will someone be willing to point me on the
> > right direction?
> The implicit conversion from D array to pointer has been removed
in 0.177.
> All you need to do is add ".ptr" to convert from arrays to
pointers now.
> Though since you have no way of knowing whether or not the passed-
in strings
> are zero-terminated, you should use toStringz whenever passing D
strings to
> C functions.
> return toString(getenv(toStringz(pSymbol)));


thanks.


More information about the Digitalmars-d-learn mailing list