cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
from printf to string
from printf to string
May 6, 2013 at 3:27pm UTC
chrisben
(99)
Hi,
I have the following line of the code. Now I want to save the content to a string. Is there a quick way for me to do the conversion using the same arguments/codes of printf?
printf ("Some different radixes: %d %x %o %#x %#o \n", 100, 100, 100, 100, 100);
Thanks
Chris
May 6, 2013 at 3:36pm UTC
LB
(13399)
s
printf
?
http://www.cplusplus.com/reference/cstdio/sprintf/
Last edited on
May 6, 2013 at 3:36pm UTC
May 6, 2013 at 6:14pm UTC
chrisben
(99)
yes. i got memory lost earlier. thanks
May 6, 2013 at 7:33pm UTC
LB
(13399)
You should use RAII so that won't happen any more :) Reference Analysis Is Important!
Topic archived. No new replies allowed.