how can i convert a char to integer?
but i don't want to use any function
For example, a user input a number '1'
and it is a char type, so when i use it,
i want it to become a integer type
What can I do? thanks!
how can i convert a char to integer?
but i don't want to use any function
For example, a user input a number '1'
and it is a char type, so when i use it,
i want it to become a integer type
What can I do? thanks!
Code:int main() { char ch = '5'; int nNumb = ch - '0'; return 0; }
thx!