Darren Cook
2012-02-10 09:47:16 UTC
ip::address's from_string() function does not seem to be working; it
gives me 0.0.0.0 whatever string I pass.
A very minimal reproducible example below, it outputs:
Set host to 0.0.0.0
I'm using boost 1.40 (ubuntu 10.04). Google is strangely quiet; so I
guess I'm doing something wrong??
Darren
//Compile and run with "g++ test.cpp -lboost_system;./a.out"
#include <iostream>
#include <boost/asio.hpp>
int main(int argc, char* argv[])
{
boost::asio::ip::address host;
host.from_string("127.0.0.1");
std::cout<<"Set host to "<<host<<"\n";
return 0;
}
gives me 0.0.0.0 whatever string I pass.
A very minimal reproducible example below, it outputs:
Set host to 0.0.0.0
I'm using boost 1.40 (ubuntu 10.04). Google is strangely quiet; so I
guess I'm doing something wrong??
Darren
//Compile and run with "g++ test.cpp -lboost_system;./a.out"
#include <iostream>
#include <boost/asio.hpp>
int main(int argc, char* argv[])
{
boost::asio::ip::address host;
host.from_string("127.0.0.1");
std::cout<<"Set host to "<<host<<"\n";
return 0;
}
--
Darren Cook, Software Researcher/Developer
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)
Darren Cook, Software Researcher/Developer
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)