you should change char* to char, right now numberstring is an array of pointers – josefx Jun 1 '12 at 9:10.
A char in C is already a number (the character's ASCII code), no conversion required.
@kevin001 If you want to convert the char to int and a character '1' provides a ascii number that's not 1, you need to remove the offset '0' to realign it to count from 0-9.
Why don't I have to convert int to char with getchar() when reading into a buffer in C?
Then your char could be said to be 'converted'.
How can I convert char a[0] into int b[0] where b is a empty dynamically allocated int array I have tried … I want 4 but it gives me ascii value 52 Also doing
Converts value into a character string by successively filling the range [first, last), where [first, last) is required to be a valid range.
Subreddit rules. 1. No unprofessional/derogatory speech. Follow reddiquette: behave professionally and civilly at all times.