dynamic_cast issues: typeid object is not equal, but name is equal
问题 I found that dynamic_cast didn't work in a situation where I expected it to, and looking at the typeid of the objects at runtime has made the situation even less clear. I just want a cast from base to derived, and I can't figure out why it's not working. I have a class structure something like this: class BoundaryCondition { public: virtual void DoSomething() = 0; virtual ~BoundaryCondition() { /* * */ } } class ReflectingBc : BoundaryCondition { public: virtual void DoSomething(); } class