Darren Cook | 10 Feb 10:47

ip::address::from_string() not working

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;
}

-- 
Darren Cook, Software Researcher/Developer

http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
asio-users mailing list
asio-users@...
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio


Gmane