On 11/04/10 15:41, Nrgyzer wrote:
I want to do the following:struct MyStruct { char[] structName; public char[] toString() { return structName; } } ... class MyClass { private static void function(void*) callBack; private static void* callBackValue; ... static this() { MyStruct test = MyStruct(); test.structName = "Struct name"; callBack =&cb; callBackValue =&test; } ... public void cb(void* value) { MyStruct temp = *((cast(MyStruct*) value)); writefln(temp); } }
Why the need for void* everywhere? Surely you could save the effort and store it as a MyStruct?
