How do I convert a D structure to a C Pointer in D? Something like:
struct test {}
void main() {
auto testv = test();
randomfunction(cast(cPtr) test);
}
If you just want to pass the struct's address to the function, use the &
(address-of) operator to get a pointer to a structure variable:
randomFunction(&testv);