where is the memory corruption?

Dukc ajieskola at gmail.com
Wed Dec 9 20:54:49 UTC 2020


On Wednesday, 9 December 2020 at 20:35:21 UTC, Jack wrote:
> the output is "h" rather "hello". What am I missing?

In the sayHello function, you are converting a pointer to utf16 
character into utf8 string, not utf16 string to utf8 string. 
Convert the C wstring to a D `wstring` first 
(std.string.fromStringz).



More information about the Digitalmars-d-learn mailing list