title: FORTRAN EQUIVALENCE in C++ language
body: <p>I am converting a part of FORTRAN 77 code to C++</p>
  
  <pre><code>DIMENSION ARRAY(513),JRRAY(2,513)
  EQUIVALENCE (ARRAY(1),JRRAY(1,1))
  </code></pre>
  
  <p>This is implicit code where every variable name starting with I,J,K,L,M,N,O,P are implicitly taken as integer type. Thus, here we have an double precision array named ARRAY and a integer array named JRRAY.</p>
  
  <p>The equivalence statements points the start of both arrays to the same memory location. Somehow, however, the bytes are interpreted differently as double when ARRAY(I) is called or integers when JRRAY(I,J) is called (at least that is what I think what happens).</p>
  
  <p>Is there a similar way in C++ where the same memory location can be interpreted as a different type?</p>
  
  <p>Or something that does the same as EQUIVALENCE in FORTRAN, but then in C++.</p>