Calling a C Function with C-style Strings

Ali Çehreli acehreli at yahoo.com
Sat Nov 30 10:55:30 PST 2013


On 11/30/2013 07:59 AM, Adam D. Ruppe wrote:

>      tempBuffer[name.length] = 0; // make sure it is zero terminated
> yourself

Because char.init is not 0 in D: :)

     assert(tempBuffer[name.length + 1] == '\xff');

Ali



More information about the Digitalmars-d-learn mailing list