title: How to properly dereference multidimensional arrays without []-operator
body: <p>So, I've figured out how to dereference a multidimensional array like this:</p>
  
  <pre><code>#include &lt;tchar.h&gt;
  #include &lt;iostream&gt;
  
  wchar_t g_pppwcSymbol[2][3][4];
  
  int main(int argc, TCHAR **argv) 
   {
       (* (*( (*(g_pppwcSymbol+1) )+2 )+3 ) ) = L'K';
       std::wcout&lt;&lt;g_pppwcSymbol[1][2][3];
       std::wcin.get();
       return 0;
   }
  </code></pre>
  
  <p>Output: <code>K</code></p>
  
  <p>However, I've also heard that the compiler transforms this into a 1-dimensional array, is that correct? This would mean that all the wchar_t elements follow up each other in the memory. So there must be a way to do something like this:</p>
  
  <pre><code>***(g_pppwcSymbol + x) = value;
  </code></pre>
  
  <p>However I'm not sure how this works exactly. Could someone elaborate?</p>
  
  <hr>
  
  <h2>EDIT:</h2>
  
  <p>this seems to work so far:</p>
  
  <pre><code>int main(int argc, TCHAR **argv) 
   {
       /*(* (*( (*(g_pppwcSymbol+1) )+2 ) + 3)) = L'K';*/
       /*std::wcout&lt;&lt;g_pppwcSymbol[1][2][3];*/
       ***(g_pppwcSymbol + 1) = L'K';
       std::wcout&lt;&lt;g_pppwcSymbol[1][0][0];
       std::wcin.get();
       return 0;
   }
  </code></pre>
  
  <p>output: <code>K</code></p>
  
  <hr>
  
  <h2>NEXT EDIT:</h2>
  
  <h2>Working model:</h2>
  
  <pre><code>static const int X = 2;
  static const int Y = 3;
  static const int Z = 4;
  wchar_t g_pppwcSymbol[X][Y][Z];
  
  int main(int argc, TCHAR **argv) 
   {
       int iAccess = ((Y*Z) * 1) + ((Z) * 2) + 3;
       *( (**g_pppwcSymbol) +  iAccess) = L'K';
       std::wcout&lt;&lt;g_pppwcSymbol[1][2][3];
       std::wcin.get();
       return 0;
   }
  </code></pre>
  
  <p>Output: <code>K</code></p>