Infix to Postfix using file input & stack

I'm using a test file before I use the one my teacher gave me.
My test file looks like this
3
3+1
(3+1)
Now I'm trying to take the file, read it line by line and turn the infix equations into postfix equations. In other words, they're suppose to end up looking like this:
3
31+
31+
The assignment is to utilize a non-STL stack to make it so.

Here's the pseudocode I'm using from my textbook so you can see what I'm referencing:

1. Initialize a stack of characters to hold the operation symbols and parentheses
2. do
if(the next input is a left parenthesis)
Read the left parenthesis and push it onto the stack
else if( the next input is a number or other operand)
Read the operand and write it to the output
else if( the next input is one of the operation symbols)
{
do
Print the top operation and pop it
while none of these three conditions are true:
1. The stack becomes empty, or
2. The next symbol on the stack is a a left parenthesis, or
3. The next symbol on the stack is an operation with lower precedence
than the next input symbol
Read the next input symbol, and push this symbol onto the stack
}
else
{
Read and discard the next input symbol(which should be a right
parenthesis).
Print the top operation and pop it; Keep printing and popping until
the next symbol on the stack is a left parenthesis.(If no parenthesis
is encountered, then print an error message indicating unbalanced
parentheses, and halt.) Finally, pop the left parenthesis.
}
while(there is more of the expression to read);
3. Print and pop any remaining operations on the stack. (There should be no remaining left parentheses; if there are, the input expression did not have balanced parentheses.)

So far I'm only reading and outputting numbers but it doesn't output the operators. My output looks like this right now:

3
3
1
31

I'm trying to figure out why it doesn't want to output the operators at all. This is only my third semester programming, so I'm still pretty new at this. Is there something that I'm doing wrong or something that I haven't thought of yet?

I guess now I'm at a complete loss on this project then. I don't it would be so bad if the file we're suppose to read from didn't start with an empty line. This was the only way I could see it working unless there's something out there that I haven't found yet.

Ok so here's my problem and I've been beating my head against the wall for hours on this. When I come upon the line 5+7, my program will read the 5 straight out to the screen on the first go around. However when it comes to the + it does what it's suppose to at first but instead of ignoring the do/while loop it just goes into it. The stack is empty so it should ignore this on the first go around but it doesn't. I can't seem to figure out where I'm going wrong on this one. Can anyone help me please?

do
Print the top operation and pop it
while none of these three conditions are true:
1. The stack becomes empty, or
2. The next symbol on the stack is a a left parenthesis, or
3. The next symbol on the stack is an operation with lower precedence
than the next input symbol
Read the next input symbol, and push this symbol onto the stack