|
Boost Users : |
Subject: Re: [Boost-users] lexical problem
From: pedro chaparro (pdro07_at_[hidden])
Date: 2009-09-15 05:09:44
in the ouput i have this : 5050�ͷ
the first "50" i write with
std::cout.write(buf.data(),len);
and the second "50" plus those stange characters
std::string datos=buf.data();
printf("%s \n",datos);
i suppose that those characters means that are not null terminated. right?
So how can i only take the "50" without the other characters?
thanks
2009/9/14 <cliffg_at_[hidden]>
> >> std::string datos=buf.data();
> *>> rxint=boost::lexical_cast(datos);* //(here is the problem)
>
> Is the data in buf nul char terminated? Is the numeric data actually
> numeric and not something else?
>
> Cliff
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- Ing Pedro Alonso Chaparro Valero Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net