C
cppaddict
Hi,
Currently, whenever I need to work with numbers as strings, I am using
sprintf to do the conversion. This seems a little prehistoric. Is
there a current STL alternative?
One would think that std::string would support it somehow. But things
like:
std::string test = "hello";
test += 99;
std::cout << test;
do not result in "test99" as I would like. Can anyone help me out, or
is something in the printf family of functions still required?
Thanks,
cpp
Currently, whenever I need to work with numbers as strings, I am using
sprintf to do the conversion. This seems a little prehistoric. Is
there a current STL alternative?
One would think that std::string would support it somehow. But things
like:
std::string test = "hello";
test += 99;
std::cout << test;
do not result in "test99" as I would like. Can anyone help me out, or
is something in the printf family of functions still required?
Thanks,
cpp