Position(const Position &pos) : x(pos.x), y(pos.y) {}
This looks like SFML.
The position stored is a sf::Vector2f, which is basically the same thing you're making here.
Just do sf::Vector pos = sprite.getPosition();. Then you can do pos.x and pos.y. You also get the plus that it'll make it easier to interact with other parts of SFML's library.
In the future, explain why it doesn't work. "It isn't working" doesn't do us too much good to try to help you. Here I'm assuming you aren't getting the values you're expecting.