caracters and variables concatenation

Search Info
Mon Jan 20 11:24:00 GMT 2003


I want to get rid of the sprintf function and do the same functionality with pure C++.
Say, we have a string "hello" and an integer variable i with the content "1".
I want to store in char *str the string "hello1".
with sprintf it is simple sprintf(str, "hello%d",i), but i want to know how to do it in c++ (without including stdlib.h or stdio.h).

Sign-up for your own FREE Personalized E-mail at

Meet Singles

More information about the Gcc-help mailing list