char* vs char[]

jicman jicman at
Sat Dec 16 21:08:38 PST 2006

== Quote from Jarrett Billingsley (kb3ctd2 at's article
> "jicman" <jicman at> wrote in message
> news:em2fih$1ks5$1 at
> > 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)));


More information about the Digitalmars-d-learn mailing list