SFML community forums
Help => Network => Topic started by: slinky55 on September 08, 2022, 07:07:45 pm
-
I was reading documentation on the networking module, and the example code shows that the sf::IpAddress constructor may take a string as it's argument, however when writing my own code, this doesn't seem to be the case. I took a look at the header file, and there doesn't seem to be this constructor. Is this a mistake in the documentation, or on my part?
-
Not sure what you're talking about, because the IpAddress class certainly has a constructor taking a string: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1IpAddress.php#a656b7445ab04cabaa7398685bc09c3f7
If you use the latest in development SFML version, then the API has changed indeed to sf::IpAddress::resolve("127.0.0.1");
-
If i'm using SFML as a submodule would this be the issue?
-
Not sure what "it" means in that context.
You can use SFML as submodule.
If you fetch the master branch, then you get the latest version, which has a slightly different API, as described.