Jump to: navigation, search


A void * is a pointer that can be implicitly converted to and from any data pointer type. No cast is necessary, and in some cases (specifically, on the return value of a library function such as malloc, can be harmful by masking a failure to properly declare the function. As void is an incomplete type which cannot be completed, it may not be dereferenced, and you cannot do pointer arithmetic on a pointer to void.

A char* and a void* are guaranteed to have the same internal representation.

Personal tools