I\'m writing this project on DFA and i want to save and covert each digit of an integer saved as a string to an int array.This is the code from the function responsible for tha
c_str()
doest not work because after calling at(i)
you've got a char not a string. I suggest you to use:
temp_final[i]=final_states.at(i) - '0';
Here you take an ASCII code for a char symbol and when you subtract a '0'
you get exectly an int you need, because all the digits go in order in ASCII table.