Hello,
Suppose that I have a string which consists of "0, 1, 2, 3, 4, 3, 2, 1". How do I parse the integer at, lets say, location 5?
What I'm trying to do is traverse the string and put only the numerical values of the string into an array of integers. Problem is, when I try to do:
an_array[k] = a_string[x]
an_array[k] gets assigned an ascii value which cooresponds with the character at location x of a_string. How can I assign the actual integer of a_string[x] to an_array[k]?
Suppose that I have a string which consists of "0, 1, 2, 3, 4, 3, 2, 1". How do I parse the integer at, lets say, location 5?
What I'm trying to do is traverse the string and put only the numerical values of the string into an array of integers. Problem is, when I try to do:
an_array[k] = a_string[x]
an_array[k] gets assigned an ascii value which cooresponds with the character at location x of a_string. How can I assign the actual integer of a_string[x] to an_array[k]?