Jun 23, 2006 #1 tvrtko Programmer Nov 26, 2003 53 HR How to get ASCII code of character? Thanks in advance.
Jun 23, 2006 #2 dEVooXiAm Programmer Jun 8, 2005 103 LT Where do you want to get it? in C language, data type 'char' is a numeric type, so either using debugger, or printing the value Code: printf("%d", cChar); will provide you with the exact code of your character. ------------------ When you do it, do it right. Upvote 0 Downvote
Where do you want to get it? in C language, data type 'char' is a numeric type, so either using debugger, or printing the value Code: printf("%d", cChar); will provide you with the exact code of your character. ------------------ When you do it, do it right.
Jun 23, 2006 Thread starter #3 tvrtko Programmer Nov 26, 2003 53 HR I need to save ASCII code of character in int variable. Is there some function in c++ to do this? Upvote 0 Downvote
Jun 23, 2006 1 #4 cpjust Programmer Sep 23, 2003 2,132 US Code: char c = 'F'; int ascNum = c; A char is just a 1 byte int. Upvote 0 Downvote