Proper C Pointer Binding
R
robertlaszlopali at gmail.com
Wed Mar 26 02:55:27 PDT 2014
> void main() {
>
> // init screen and OpenGL setup
>
> auto font = loadFont(cast (char * ) "Arial.TTF");
>
> scope (exit) destroyFont(font);
>
> // draw some text
>
> // close OpenGL and SDL with some second delay
> }
Also I am not sure about the string casting to char * here.
I have been told that literals are 0 terminated, but strings
usually are not. Should I in your opinion create a wrapping
function in D that does convert the string to a proper
char * value? And how would I do that?
Thanks in advance for all the help!
Róbert László Páli
More information about the Digitalmars-d
mailing list