title: SFML setPosition()
body: <p>I have problem with my function. Im using SFML library and I dont know why setPosition() dosent works.
  However, when I put setPosition() under function call, it works correctly. Any suggestions?</p>
  
  <pre><code>void foodRandPos(Sprite spriteFood,  int blockDimensionXY, int foodDimensionXY, int windowSizeX, int windowSizeY ){
  
  int frameWidth = (windowSizeX - (2 * blockDimensionXY) ) / blockDimensionXY;
  int frameHeight = (windowSizeY - (2 * blockDimensionXY) ) / blockDimensionXY;
  int foodRandPosX = ( ( (rand()%frameWidth) + 1) * foodDimensionXY);
  int foodRandPosY = (( (rand()% frameHeight) + 1) * foodDimensionXY);
  spriteFood.setPosition((float) foodRandPosX + 300, (float) foodRandPosY);}
  </code></pre>