Paul, How do you convert integers to string in c++?
//john On 28 Mar 2007 03:19:17 -0700, Paul Herring <[EMAIL PROTECTED]> wrote: > > On 3/28/07, GLOGIC 20 <[EMAIL PROTECTED] <glogic%40hotmail.com>> wrote: > >From: "John Gunnarsson" <[EMAIL > >PROTECTED]<mailing.list.recipient%40gmail.com> > > > > > > > >How do I convert a integer to a string in c++ the best way? > > >So far I have been using the following snippet, which seems a bit > overklll. > > > > itoa(number, string, 10); > > where 10 is the base used is what i use > > Two problems with that - > 1) since it's a C function, it deals with C strings, not std::string. > 2) itoa() isn't a Standard function, and will not exist in all compilers. > > -- > PJH > Aio, quantitas magna frumentorum est > > [Non-text portions of this message have been removed]
