cast from void * to int code example
Example 1: convert void * to int
int a = 5;
void *p = (void *)a;
int b = (int)p;
Example 2: void * to int
int a = 5;
void *p = (void *)a;
int b = (int)p;
int a = 5;
void *p = (void *)a;
int b = (int)p;
int a = 5;
void *p = (void *)a;
int b = (int)p;