+ 3

Converting string to code

how to convert string to ASCII

18th Mar 2017, 9:24 PM
Thabiso Mcd Mohlomi
Thabiso Mcd Mohlomi - avatar
2 Answers
0
Just assign the char to an int variable. int x; x = 'a'; cout << x; output should be 97
18th Mar 2017, 9:45 PM
Chaitanya
0
to add to that answer, put the string into an array of characters, then loop through that technique
18th Mar 2017, 10:01 PM
William La Flamme
William La Flamme - avatar