I have trying to parse string data in a stack into a arithmetic equivalent. I implemented a stack and used strtok to parse it into tokens and placed them into my stack. Now I am trying to pull them off the stack and do the expression that is carrying them. But I am lost on how to do this. On my Stack I will have ( 2 + 2) + 3 and I can pop them off at a time to get to keep the correct order but I have no idea how to make them into an equation from the stack. Can any body point me to a way to do this? I am not looking for code but some type of explanation on how to create this. I can pull them off the stack and know how to convert the doubles into doubles but how can i assign this into a string for the program to do the math?
Thanks