title: Is it possible to use an enum to have access to an array?
body: <p>Will the following work:</p>
  
  <pre><code>enum TileBmp {Mask, Grass, Sand, Snow, Swamp, Paved, Rock, Savannah, Lava}
  
  ID2D1Bitmap* pBmpTile[TileBmp];
  </code></pre>
  
  <p>Will this create an array of size 9 in which any element can be accessed using either its number or its name? For exemple, would pBmpTile[3] and pBmpTile[Snow] both refer to the same ID2D1Bitmap*?</p>
  
  <p>I cannot try it now and won't be capable until some times. Else I would be trying it myself.</p>
  
  <p>If this won't work, are there cleaner alternatives to both</p>
  
  <p><code>ID2D1Bitmap* pBmpTile[9]</code></p>
  
  <p>and </p>
  
  <pre><code>ID2D1Bitmap* pBmpMask, pBmpGrass, pBmpSand, pBmpSnow, pBmpSwamp, pBmpPaved, pBmpRock, pBmpSavannah, pBmpLava;
  </code></pre>
  
  <p>?</p>