Top "Void-pointers" questions

A void pointer (void *) in C and C++ is a pointer that points to a memory location with no specified type.

dynamic_cast from "void *"

According to this, void* has no RTTI information, therefore casting from void* is not legal and it make sense. If …

c++ rtti void-pointers dynamic-cast
type casting integer to void*

#include <stdio.h> void pass(void* ); int main() { int x; x = 10; pass((void*)x); return 0; } void pass(void* …

c linux pointers pthreads void-pointers
Using intptr_t instead of void*?

Is it a good idea to use intptr_t as a general-purpose storage (to hold pointers and integer values) instead …

c pointers 32bit-64bit void-pointers intptr
What is a void pointer and what is a null pointer?

So I was going through some interview questions and I came across one about void and null pointers, which claims: …

c++ pointers void-pointers null-pointer
Passing Void type parameter in C

Hello there I am working on an assignment in C where I need to pass in an unknown type of …

c void-pointers
Using void pointer to an array

I was just trying to use a void pointer to an integer array ,I tried to see if i can …

c pointers void-pointers pointer-arithmetic
Casting void pointers

I've seen a lot of the following in older C code: type_t *x = (type_t *) malloc(...); What's the point …

c pointers void-pointers
warning: pointer of type ‘void *’ used in arithmetic

I am writing and reading registers from a memory map, like this: //READ return *((volatile uint32_t *) ( map + offset )); //WRITE *((…

c++ pointers void-pointers pointer-arithmetic
Dereferencing void pointers

In the hope of gaining a better understanding of the answers given in this post, can someone please explain to …

c arrays void-pointers dereference
Malloc and Void Pointers

I'm studying this malloc function and I could use some help: static void *malloc(int size) { void *p; if (size &…

c malloc void-pointers