Hi,
I'm not entirely sure what exactly you're trying to make your function do here, but you cannot chain return calls like this. If you want your function to return the position at which the mouse button was clicked according to some sf::Event, return it as a vector, like this:
return sf::Vector2i(menuEvent.mouseButton.x, menuEvent.mouseButton.y);
Also, not sure if this is just stripped down code or an extract of what you're actually using, but if the latter is the case, you might have to change it use window.pollEvent(menuEvent) in a while()-loop to catch all events from an sf::Window (unless menuEvent is being passed as a parameter to the function, or something).
About the "::" vs "." question: accessing static class members or namespaces requires "::" to be used. The "." operator is for accessing members and functions of class instances / objects.
~ def8x
ninja edit: fixed a stupid mistake I made with the vector code