Use an import.import std.string; import std.conv; void main(string[] args) { auto value = toStringz("Hello World"); auto result = write(value); auto s = to!(string)(result); writeln(s); }Also all string literals in D are zero terminated so you could write the call like this:auto result = write("Hello World");
Okay, thank you very much! But now i get the access violation error again. If i type: gcc -c -otest.c.o the 'test.c.o' file is generated but if i type: dmd main.d test.c.o i get: 'Error: unrecognized file extension o'?
