Dereference void pointer

It doesn’t make sense to dereference a void pointer. How will the compiler interpret the memory that the pointer is pointing to? You need to cast the pointer to a proper type first:

int x = *(int*)lVptr;

Leave a Comment