I understand the use of void pointer for malloc implementation.
void* malloc ( size_t size );
Can anyone suggest other reasons or provide
If you are interfacing with C code and need to pass through a C++ object, but a C library will only take a generic pointer, then when you retrieve the pointer you need to re-cast it to the proper type.
Void pointers probably shouldn't be used very often, but they can help when you're trying to use a library function that works with arbitrary pointers, and doesn't really care what data is represented by that memory.