Hi,
(I'm french, sorry for my bad english)
The following doesn't compile :
import std.stdio;
void bar(void* str)
{
writefln(cast(char[]) str);
}
void main()
{
char[] foo;
foo = "Hello world";
bar(cast(void*) foo);
}
$ dmd void.d
void.d(5): Error: e2ir: cannot cast from void* to char[]
How should I write it to make it work ?