#include <vector>
#include <string>
#include <iostream>
#include <iomanip>

using namespace std;

using valtype = unsigned long;

valtype * myvec;

int main(int argc, const char * argv[])
{
    myvec = new valtype[26*2*40*5];
    valtype* myarray=&myvec[0];

    typedef valtype MyType[26][2][40][5];
    for(int i=0 ;i<26; ++i)
    {
        for(int j=0; j<2; ++j)
        {
            for(int k=0; k<40; ++k)
            {
                for(int l=0; l<5; ++l)
                {
                    unsigned long L = ((i*100+j)*100+k)*100+l;
                    reinterpret_cast<MyType &>(*myarray)[i][j][k][l] = L;
                }
            }
        }
    }
    for(int i=0 ;i<26; ++i)
    {
        for(int j=0; j<2; ++j)
        {
            for(int k=0; k<40; ++k)
            {
                for(int l=0; l<5; ++l)
                {
                    cout << "[" << setw(2) << i << "][" << setw(2) << j << "]["
                        << setw(2) << k << "][" << setw(2) << l << "] = "
                        << reinterpret_cast<MyType &>(*myarray)[i][j][k][l]<<endl;
                }
            }
        }
    }
}
