79357985

Date: 2025-01-15 11:17:46
Score: 2.5
Natty:
Report link

How about this:make these classes inherit from an intermediate base class, Base2, which itself inherits from the original Base. This way, you can achieve the same effect by checking whether Base* p can be converted to Base2*.This also aligns with the concept of inheritance, as these classes do share specific common traits.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): How
  • Low reputation (1):
Posted by: sheldon5