Converting int to char
-
Hello, I have the Ascii Code from a character, for example: 101, which is e. How can I convert this int Value into a char or better CString ? With best regards, RedDragon2kx
-
Hello, I have the Ascii Code from a character, for example: 101, which is e. How can I convert this int Value into a char or better CString ? With best regards, RedDragon2kx
-
Sorry but I think I wasn't clear enough. I need the integer(101) represtented as a char(e). So I need to convert the ASCII code(101) back to the character it represents
-
Sorry but I think I wasn't clear enough. I need the integer(101) represtented as a char(e). So I need to convert the ASCII code(101) back to the character it represents
int asc_int; CString S_temp; S_temp.Format("%c",asc_int); thats it :cool: Vikas Amin Embin Technology Bombay vikas.amin@embin.com
-
Sorry but I think I wasn't clear enough. I need the integer(101) represtented as a char(e). So I need to convert the ASCII code(101) back to the character it represents
-
int asc_int; CString S_temp; S_temp.Format("%c",asc_int); thats it :cool: Vikas Amin Embin Technology Bombay vikas.amin@embin.com
Thank you to you both.
-
Hello, I have the Ascii Code from a character, for example: 101, which is e. How can I convert this int Value into a char or better CString ? With best regards, RedDragon2kx
If you remember that a
char
is just anint
with a smaller range, then assigning anint
to achar
is just that, a simple assignment.
"Take only what you need and leave the land as you found it." - Native American Proverb
-
Hello, I have the Ascii Code from a character, for example: 101, which is e. How can I convert this int Value into a char or better CString ? With best regards, RedDragon2kx
int i_value;
char c_value;
c_value = static_cast<char>(i_value);
Software Zen:
delete this; // [Fold With Us!](http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx)[[^](http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx "New Window")]