I need to compare two characters at line 101. But even though they are equal, it does not enter at the right condition. trying ababcbaba when it tries to compare b with b, somehow it does not return as equal. Mainly I need to compare if the left part of the string before the letter c is equal to its right part after c at reverse mode.
Note that you are popping two elements in each iteration of the loop. Once on line 100 and again on line 101. If you want to use the same char on both lines you should call pop() only once and store the result in a variable and then you can use it as many times as you want without affecting the stack further.
You also need to think of a way to stop the loop when you have found that the two sides are equal. And how do you handle the situation when the two parts have different length?
When you print the message at the end are you sure you should use the variable stop? Won't stop always be true after the loop has ended?