you have a bad prototype
int paintfield(sf::RenderWindow App, sf::Sprite fieldsprite[3][3], sf::Image tuscia, sf::Image imageO, sf::Image imageX)
the first argument should be a reference, otherwise it would try copying your RenderWindow, which is unrequired
int paintfield(sf::RenderWindow &App, sf::Sprite fieldsprite[3][3], sf::Image tuscia, sf::Image imageO, sf::Image imageX)
even if it works, the way you pass arguments is quite wrong