2
Contributors
1
Reply
2
Views
13 Years
Discussion Span
Last Post by Narue
0

With single digits all you need to do is subtract the character '0' from the value. For mutidigit numbers you need to perform a conversion, and the easiest way to do so is with strtol (in <stdlib.h> for C or <cstdlib> for C++), sscanf (recommended only for C), stringstream (for C++), or anything similar. Can you be more specific as to what these "numbers" are that you're converting and whether this is C or C++?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.