I'm trying to create a void* from an int. But gcc always give me a warning, that i cannot cast an int to a void*. Here is my code:
#define M_TABLE_SIZE 64*1024
static const void* M_OFFSET = M_TABLE_SIZE;
I already tried (void*)M_TABLE_SIZE
but then I get an error that I cannot use the *
operator.
What is the correct method to cast an int to a void*?