@bruglesco Haven't use SFML in years, but I think you're returning a temporary object, getting its backing c_str, then throwing out the temporary object.
There is no c_str() method, is there? I think you might be implicitly converting the returned const sf::String& to a std::string, then throwing out the c_str you get from that