Hello. My task is to programm a infix to postix programm.
I already created a stack with a linked list. Now I need to scan a string and for example if somebody enters "a+b*2" ... I need to scan the string for example ... "if string == + push to stack" How I can do that? Please give me a hint. Here is my code!
I'm not sure what you mean by line 65 "it==t". I understand this is where your error is, but I'm reading through your code and not seeing a variable t.
By the sound of your introductory paragraph you're trying to compare character values, correct? If that's the case, then you'll need something like
if (str.substr(it,1).compare("insert value here?")==0)
Since this actually looks at the input string and compares it to a one-length string (instead of comparing numbers), I think this is what you were looking for. Then again I could be completely wrong.