Suppose i have written a function called fun takes a parameter which is a pointer to a class object a.
here is the code
/code
bool void fun(a *ptr)
{
// here i want to check the validity of the pointer
}

I want to check the validity of the pointer.That means i want to check wheather the object is pointing to the correct class or its subclass's object or not.

Please let me know
Thanks
Anand