Just convert it to int and back - there's already an implicit
conversion from char to int:
char c = 'A';
int ascii = c;
c = (char) ascii;
Note that this will be the *Unicode* value of any particular char
rather than just the ASCII value. Of course, for all ASCII characters
it's the same thing.
Just convert it to int and back - there's already an implicit
conversion from char to int:
char c = 'A';
int ascii = c;
c = (char) ascii;
Note that this will be the *Unicode* value of any particular char
rather than just the ASCII value. Of course, for all ASCII characters
it's the same thing.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.