#include <iostream>

using std::cout;

struct A
{
    int a;
    char b;
    A(){ a = 4; }
};

struct B
{
    int c;
    B(){ c = 5; }
};

A *a = new A;
B *b = new B;

int main()
{ 
    a = reinterpret_cast<A*>(b); 
    cout << a -> a; //5
}