C++ conversion of integers into strings, how

  • Context: C/C++ 
  • Thread starter Thread starter chandubaba
  • Start date Start date
  • Tags Tags
    C++ Integers Strings
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
chandubaba
Messages
39
Reaction score
0
how to convert an input of integer(more than 1 character) type into output which is in string in c++
 
Physics news on Phys.org
(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.