C1414: Casting to pointer of non base class

[DISABLE, INFORMATION, WARNING , ERROR]

Description

A cast was done from a pointer of a class/struct to a pointer to another class/struct, but the second class/struct is not a base of the first one.

Example
  class A{} a;

  
  class B{};

  
  void main(void) {

  
    B* b= (B*)&a;

  
  }

  
Tips

Check if your code really does what you want it to.