1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C++ conversion of integers into strings, how

  1. Oct 25, 2006 #1
    how to convert an input of integer(more than 1 character) type into output which is in string in c++
     
  2. jcsd
  3. Oct 25, 2006 #2

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    (I'm assuming you've acquired an int value that you wish to convert into a char* or a std::string)

    Use std::stringstream. Or do it the C-way with sprintf. Or, roll your own method.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: C++ conversion of integers into strings, how
Loading...