fork download
  1. //Shoot Right
  2. if (mPlayer.getPosition().x >= mEnemy.getPosition().x)
  3. {
  4. if(mPlayer.getPosition().y >= mEnemy.getPosition().y && mPlayer.getPosition().y <= mEnemy.getPosition().y+66)
  5. {
  6.  
  7. Bullet newBulletEnemyRight(sf::Vector2f(10, 10));
  8. //set position
  9. newBulletEnemyRight.setPos(sf::Vector2f(mEnemy.getPosition().x, mEnemy.getPosition().y + 50));
  10. newBulletEnemyVecRight.push_back(newBulletEnemyRight);
  11.  
  12. }
  13.  
  14.  
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:3: error: expected unqualified-id before ‘if’
   if (mPlayer.getPosition().x >= mEnemy.getPosition().x)
   ^~
stdout
Standard output is empty