???

How to declare a two value to a character and what is the code to convert a character to integer?
what is the code to convert a character to integer?

You mean getting the ascii code: int ( yourchar )
Or if you have '3' converting it to 3: yourchar > '0' && yourchar <= '9' ? yourchar-'0' : 0
Is there anything that will give a shorter code, like the ATOI that will convert tghe ASCII to integer..??
Is there anything that will give a shorter code, like the ATOI that will convert tghe ASCII to integer..??
to convert character to integer
char c[5]={" hi"};
int t=atoi(c);
Topic archived. No new replies allowed.