This is how i rotate the player. In some situations you need to add or subtract 90 depending on what direction your sprite is facing. The only time you dont add or minus 90 is when your sprite texture faces towards the right, which is where 0 degrees is in sfml.
float angle = atan2(player.y - sprite.getPosition().y, player.x - sprite.getPosition().x);
angle = ((angle * 180) / 3.14159265) + 90;
{
angle = 360 - (-angle);
}
sprite.setRotation(angle);
and for a bullet for example, use the above to rotate it towards it's target and then :
float x = sprite.getPosition().x;
float y = sprite.getPosition().y;
float xR = sin((sprite.getRotation()*3.14159265 / 180)) * speed;
float yR = cos((sprite.getRotation()*3.14159265 / 180))* -speed;
sprite.setPosition(x + xR * dt, y + yR * dt);
to move towards the direction it's rotated towards. As for the bullets not hitting, either make them travel faster, or perhaps make sure that bullets and turrets update before the enemies otherwise the angle will usually be behind where the enemies are unless they are walking directly away from the turret. You could also try and base the turrets firing angle based on where the enemy will be before they're there, i.e a step ahead of them.