Conversion from int to char
-
Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
-
Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
are you serious? let's see, method 1: CString sText; int nValue = 9901; sText.Format("%d", nValue); If CString is not your style, you can always sprintf. itoa will also get the job done. Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW.
-
are you serious? let's see, method 1: CString sText; int nValue = 9901; sText.Format("%d", nValue); If CString is not your style, you can always sprintf. itoa will also get the job done. Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW.
Thanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
-
Thanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
Kuroro Rucilful wrote:
hanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D
if Looking for Runtime Function then you can try _ttoi or _itot function
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
don't you know that
char
is also an integral type ? you can simply do this :int i = 2;
char c = i;but maybe what you meant wasn't that but "converstion from int to C-Style strings" !?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
See maybe it is some helpful to you
CString str; TCHAR lpc[20]; TCHAR Buffer[20]; lpc[0]='\0'; (1) str.Format("%d",123); (2) wsprintf(lpc,"%d",456); (3) itoa(789,Buffer,10);
_**
**_
whitesky