in C/C++ I can cast int
to a int*
like this
int i = 0x1040c108;
int *p = (int*)i; // compiles
but why can't I do this in Go?
addr := 0x1040c108
p := (*int)(addr) // Error: cannot convert addr (type int) to type *int
What is the way to achieve this in golang ??