On 27 Mar 2007 15:13:00 -0700, John Gunnarsson
<[EMAIL PROTECTED]> wrote:

> 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.
>
> string intToStr(const int value)
> {
>         ostringstream result;
>
>         result << value;
>
>         return result.str();
> }

Not a dumb question at all...

Here's a complete example (similar to your solution):

http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.1

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to