// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

class X1
{
    public:
        int v;
};

class X2
{
    public:
        int v;
};

const int DIM = 9;
typedef X1 XX1[DIM][DIM];
typedef X2 XX2[DIM][DIM];

int main()
{
    XX1 *x1 = (XX1*)new XX1;
    cout << sizeof(*x1) << endl;
    (*x1)[5][5].v = 123;
    XX2 *x2 = (XX2*)x1;
    cout << sizeof(*x2) << endl;
    cout << (*x2)[5][5].v << endl;
    return 0;
}
