Converting an integer to a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sake
    New Member
    • Jan 2007
    • 46

    Converting an integer to a string

    This problem seems to have a fairly simple solution in C, and google seems to love to pull up solutions for C. However, C++ just seems have the exact opposite luck.

    So pretty much, I want to convert an integer to a C++ string. This way the function will return the string value: "6 and 9", when given the values 6 and 9. Any good ways to do this?

    Thanks,
    Austen :-)
  • sake
    New Member
    • Jan 2007
    • 46

    #2
    Originally posted by sake
    This problem seems to have a fairly simple solution in C, and google seems to love to pull up solutions for C. However, C++ just seems have the exact opposite luck.

    So pretty much, I want to convert an integer to a C++ string. This way the function will return the string value: "6 and 9", when given the values 6 and 9. Any good ways to do this?

    Thanks,
    Austen :-)
    gah! stupid me should have looked at the FAQ.
    Sorry >.<

    Comment

    Working...