infix to postfix using single stack doesn't work for number greater than 9
<p>I want to convert infix to postfix expression.</p>

<p>oki i got it working but i have trouble figuring out what if you input like  5 * 3 + -1.2 then its not gonna work if you want to have like negative number. This is my code:</p>

<pre><code>void infix2postfix(char* infix, char* postfix){
     char *in,*post;
        Stack&lt;char&gt;Q;
        char n;
        in = &amp;infix[0];
        post = &amp;postfix[0];
        while(*in){
            while(*in == ' ' || *in == '\t'){
                in++;
            }
            if( isdigit(*in) || isalpha(*in) ){
                while( isdigit(*in) || isalpha(*in)){
                    *post = *in;
                    post++;
                    in++;
                }
            }
            if( *in == '(' ){
                Q.Push(*in);
                in++;
            }
            if( *in == ')'){
                n = Q.Pop();
                while( n != '(' ){
                    *post = n;
                    post++;
                    n = Q.Pop();
                }
                in++;
            }
            if( operand(*in) ){
                if(Q.IsEmpty())
                    Q.Push(*in);
                else{
                    n = Q.Pop();
                    while(priority(n) &gt;= priority(*in)){
                        *post = n;
                        post++;
                        n = Q.Pop();
                    }
                    Q.Push(n);
                    Q.Push(*in);
                }
                in++;
            }
        }
        while(!Q.IsEmpty())
        {
            n = Q.Pop();
            *post = n;
            post++;

        }
        *post = '\0';
    }
</code></pre>

<p>it works but I want it to work with unary operators so it would take the input <code>4 * 5 + 4 + -1.2</code>, so there is a space between each number except when it is negative -1.2. also my code doesn't work for an integer which is more than 9, if i put 10 then it just multiplies 1*0.
.</p>
