On 3/28/07, GLOGIC 20 <[EMAIL PROTECTED]> wrote:
>From: "John Gunnarsson" <[EMAIL PROTECTED]>
> >
> >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

Reply via email to