how to convert an alpha numeric character to a number

I'm trying to build a simple enigma machine with an arduino uno, but i need to convert an alphanumeric character to a number and then back to a character, how do i do it? Is it even possible?

but i need to convert an alphanumeric character to a number

'P' is an alphanumeric character. What number would you like to convert it to?

Or, is there a range of alphanumeric characters you'd like to deal with?

All the alphanumeric characters are represented as numbers within an Arduino. Lookup ASCII table.

...R

frost9090:
I'm trying to build a simple enigma machine with an arduino uno, but i need to convert an alphanumeric character to a number

Very easy:

int i = 'P';

To save a byte of memory you an also do:

uint8_t i = 'P';

i will then contain the ascii code of 'P'.

and then back to a character, how do i do it? Is it even possible?

Of course, just as easy:

char c = i;