Hello,
Is there a function like printf that returns a string with the result of it instead of printing it on the screen? I know that there's such a function in Zortech compiler called "form", but I can't find a similar one in Visual C++!
Thanks.
Printable View
Hello,
Is there a function like printf that returns a string with the result of it instead of printing it on the screen? I know that there's such a function in Zortech compiler called "form", but I can't find a similar one in Visual C++!
Thanks.
sprintf will do that, in C++ you use the class ostringstream from the header <sstream>, use it like cout.