Skip to main content
5 events
when toggle format what by license comment
Aug 3, 2014 at 10:12 comment added Nicholas Thank you both! I didn't know of the actual relationship between char and string in C++... I think it's starting to make sense now. I'll try ostringstream - cheers!
Aug 2, 2014 at 23:34 comment added Casey I suggested using std::ostringstreams because if you ever wanted to output a number into a string it is a lot less of a hassle than trying to do it using a std::string.
Aug 2, 2014 at 21:53 comment added teh internets is made of catz @Nicholas std::strings are indeed easier to use, and much more powerful. But Casey's answer is about string streams, which are a different thing. Check out the documentation and don't forget to add ss.clear() to cleanly reset your stream (see stackoverflow.com/a/2848109/1119972).
Aug 2, 2014 at 19:48 comment added Nicholas Thanks for your reply! Can I ask - did you suggest this because it's better or easier to use strings than chars?
Aug 2, 2014 at 19:46 history answered Casey CC BY-SA 3.0