
30 Jan
2012
30 Jan
'12
4:27 p.m.
Claude wrote:
Ok. I could use strcpy() to copy the .c_str() result in my char array?
-- View this message in context: http://boost.2283326.n4.nabble.com/Conversion-from-numeric-type-to-const-cha... Sent from the Boost - Users mailing list archive at Nabble.com.
If you absolutely need to fill a char array use std::string's copy method for that: char buf[100]; boost::lexical_caststd::string(myNumericVar).copy(buf,100); See Josutti's The C++ Standard Library 11.2.4 Alternatively boost::iostreams::array_sink to directly stream to a char buffer. Jeff