I need to write a program that uses a stack to match parenthesis, brackets and curly braces. I think I got that mostly right, if I didn't miss anything. I also need my main function to repeatedly input lines, and to quit when a blank line is read. For each line, I just need that to be passed as an argument into my "balanced" function, as a string.
I'm sure it's pretty simple, but I'm just not getting it right now...Also, I deliberately left out the pop, top, push, etc. functions for the sake of simplicity. If you need them, I will happily post...but my issue is strictly with the main function, and with stringstream.
EDIT: Since my question is mainly concerning stringstream, I changed my function to just a basic function that prints the string that was passed to it. I don't want to distract from my main issue.