This has become a C++ thread but... :)

On 03/11/2013 02:30 AM, FG wrote:

> the good old stream code:
>
> std::stringstream ss; ss << number; out = ss.str();
>
> Seriously? If I could at least chain that...
>
> out = std::stringstream(number).str();
>
> Unfortunately, no.

We consider Boost a part of the C++ standard:

#include <boost/lexical_cast.hpp>

using namespace boost;

// ...

    out = lexical_cast<string>(number);

Ali

Reply via email to