I'm working on an algorithm solving program, and I've ran into a slight problem, basically the outputted strings look something like this:
Equation = (1+1-2)+(2+2)
String 1 = 1+1-2
String 2 = 2+2
It basically cuts out the problems inside the brackets, and places them in a list(which will be used later to replace the problems with answers), so now I need to know how I can turn a string into a integer, and be able to use the symbols that put them together. Someone mentioned I should restructure the strings to look like this:
1 1 +
But I don't know how that could work.
Anyway, I need the strings turned into integers, and the signs readable so that I can read and check how these integers will be combined.