title: How to pass members of arrays as parameters in functions, C++
body: <p>I'm relatively new to C++, and am trying to create a simple map for a game (I am using sfml).</p>
  
  <p>I'm creating an array of white rectangles, and I want to pass members of the array as arguments in function calls.</p>
  
  <p>For example: </p>
  
  <pre><code>Sprite WallSprites[10];
      for (int i = 0; i &lt; 10; i++) {
          WallSprites[i].setTexture(Wall);
          WallSprites[i].scale(0.3, 0.6);
      }
  
  WallSprite[0].setPosition(400,300);
  
  while (window.isOpen())
      {
          window.clear();
          window.draw(WallSprite[0]);
          window.display();
      }
  </code></pre>
  
  <p>The code above won't compile, and I'm not sure how to proceed from here. I'm pretty sure I'm not implementing the concepts correctly; any help would be greatly appreciated. Thanks!</p>