dmedia.dprogramming.com - two new tutorials
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sun May 7 16:19:34 PDT 2006
"Hasan Aljudy" <hasan.aljudy at gmail.com> wrote in message
news:e3lqt1$2h1f$1 at digitaldaemon.com...
> I've tried using SDL with D before, and I noticed that you don't need to
> use toStringz at all, for example, this works just fine:
>
> SDL_WM_SetCaption("My SDL Window", null);
>
> at least it worked when I tried it.
That works because string literals in D are implicitly null-terminated,
although the literal length won't reflect that. The problem arises when you
try to pass in a dynamically created string, which is usually not
null-terminated.
More information about the Digitalmars-d-learn
mailing list