[gameprogrammer] Re: How to assign a numeric variable to an std::string?

On Jan 11, 2008 9:36 PM, Kevin Jenkins <gameprogrammer@xxxxxxxxxx> wrote:
> float f=5;
> std::string myStr;
> myStr << f;


Use std::stringstream, or a wrapper thereof such as boost::lexical_cast.

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: