If they are polymorphic, use the typeid operator or dynamic_cast operator. Otherwise, you're out of luck.
Why do you need to know this? This sounds like a design flaw...every time you need to know the derived type, whatever you need that information for can be achieved a different way.