Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 8 months ago.
STRING TO DECIMAL
is there any command that i can convert a ASCII data to a decimal number.
1 Answer
11 years, 8 months ago.
sscanf is probably fits your requirements best, see: http://www.cplusplus.com/reference/cstdio/sscanf/, see also scanf there for a bit more examples.
So you would get something for an integer like:
char numberstring[] = "42"; int number; sscanf(numberstring, "%d", &number);