On 3/28/07, John Gunnarsson <[EMAIL PROTECTED]> wrote: > 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" > > > > > > > > > > >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. > > Paul, > > How do you convert integers to string in c++?
Personally? I don't. Generally? I think you (in your OP,) Brett and Victor have answered this question sufficiently well. -- PJH Aio, quantitas magna frumentorum est
