I have a void pointer in C++, void *p=NULL; Now, some processing makes this pointer point to an object of some class. There are 3 classes in my case and the pointer can be pointing to an object of anyone of these classes. Is there a way that I check which class's object is it pointing at.
Also can I access the object's class's methods through the void pointer or do we have to cast the void pointer?