Boost logo

Boost Users :

Subject: Re: [Boost-users] Conversion from numeric type to const char*
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2012-01-30 11:27:16

Claude wrote:
> Ok. I could use strcpy() to copy the .c_str() result in my char array?
> --
> View this message in context:
> Sent from the Boost - Users mailing list archive at

If you absolutely need to fill a char array use std::string's copy
method for that:

char buf[100];


See Josutti's The C++ Standard Library 11.2.4

Alternatively boost::iostreams::array_sink to directly stream to a char


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at