title: How to initialize three-dimensional array in Arduino?
body: <p>I just build my fist LED cube and want to expand the test code a bit. To address each LED of my 3x3x3 cube I want to use a corresponding three-dimensional array, but I got errors on its initialization.</p>
  
  <p>Here's what I did:</p>
  
  <pre><code>int cube_matrix[3][3][3] =
  {
      { {0}, {0}, {0} },
      { {0}, {0}, {0} },
      { {0}, {0}, {0} }
  },
  {
      { {0}, {0}, {0} },
      { {0}, {0}, {0} },
      { {0}, {0}, {0} }
  },
  {
      { {0}, {0}, {0} },
      { {0}, {0}, {0} },
      { {0}, {0}, {0} }
  };
  </code></pre>
  
  <p>Here's the error I get:</p>
  
  <blockquote>
    <p>error: expected unqualified-id before '{' token</p>
  </blockquote>
  
  <p>I could use a <code>for</code> loop to initialize my array and get things done but my initialization seems correct to me, and I want to know what I did wrong.</p>