You should look into Structures and Classes, and how to return them from a function.
For example:
class MyClass
{
public:
MyClass() {}
struct Position
{
float x;
float y;
};
Position getPosition() { return m_position; }
private:
Position m_position;
};
In the above code, when you call getPosition() you are returning the member variable "m_position" which itself has two member variables "x" and "y". These can be called using the "." operator right from the function. So for example if you wanted to access the "x" variable inside m_position, you could do:
MyClass obj;
float x = obj.getPosition().x;
But again, you should really read up on structures and classes. It's something basic you should know before you try using SFML