Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to convert an integer stored in a variable into string(applying operation only on variable)
Posted
Comments
[no name] 3-Jul-13 12:58pm    
You mean like using the itoa function http://www.cplusplus.com/reference/cstdlib/itoa/?
Manfred Rudolf Bihy 3-Jul-13 14:28pm    
Sounds like solution since OP hasn't mentioned any further requirements that should do the trick. :)

1 solution

Use itoa as ThePhantomUpvoter already mentioned in his comment or if you want the ability to do some more fancy formatting use sprintf which gives you the ability to "print" to a string with all the formatting options you'd also have with printf.

Cheers!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900