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;
More Related Contents:
- C pointer to array/array of pointers disambiguation
- How do pointer-to-pointers work in C? (and when might you use them?)
- Create a pointer to two-dimensional array
- Pointers in C: when to use the ampersand and the asterisk?
- Is NULL always zero in C?
- What does the ‘array name’ mean in case of array of char pointers?
- What is an opaque pointer in C?
- Post-increment on a dereferenced pointer?
- constant pointer vs pointer on a constant value [duplicate]
- What exactly is a C pointer if not a memory address?
- What exactly is meant by “de-referencing a NULL pointer”?
- Reversing a string in C
- Why do I need to use type** to point to type*?
- Meaning of “referencing” and “dereferencing” in C
- Parameter Passing in C – Pointers, Addresses, Aliases
- Using intptr_t instead of void*?
- Order of operations for dereference and bracket-ref in C
- How is the result struct of localtime allocated in C?
- What does getting the address of an array variable mean?
- Is typedef’ing a pointer type considered bad practice? [duplicate]
- Why can´t we assign a new string to an char array, but to a pointer?
- C pointers and arrays/ ‘sizeof’ operator [duplicate]
- Dereferencing this pointer gives me -46, but I am not sure why
- Can an equality comparison of unrelated pointers evaluate to true?
- “int *nums = {5, 2, 1, 4}” causes a segmentation fault
- What are the rules for casting pointers in C?
- Printing pointers in C
- lvalue required as increment operand
- pointer default value .?
- Is it possible to store the address of a label in a variable and use goto to jump to it?