about c++ convert infix to postfix when it is tow power(^^) :         
    #include<iostream>
    #include<stdio.h>
    using namespace std;
    #define size 100
    int temp,length=0,inx=0,pos=0,top=-1;
    char symbol,infix[size],postfix[size],stack[size];
    
    void push(char);
    char pop();
    int precedence(char);
    void infix_to_postfix(char[]);
    
    
    void push(char symbol)
    {
        if(top>=size-1)
            cout<<"stack is over flow push not possible"<<endl;
        else{
        top=top+1;
        stack[top]=symbol;
        } }
    
    char pop()
    {
        temp=stack[top];
        top=top-1;
        return temp;
    }
    int precedence(char symbol)
    {
        int priority=0;
        switch(symbol)
        {
            case '+':
            case '-':
                priority=1;
                break;
                
            case '*':
            case '/':
                priority=2;
                break;
            case '^':
                priority=3;
                break;
        }//end of switch()
        return priority;
    }//end of precedence()
    void infix_to_postfix(char infix[])
    {
       
        
        while(infix[inx]!='\0')
        {
            symbol=infix[inx++];
            switch(symbol)
            {
                case '(':
                    push(symbol);
                    break;
                case ')':
                    temp=pop();
                    while(temp!='(')
                    {
                        postfix[pos++]=temp;
                        temp=pop();
                    }
                    break;
                case '-':
                case '+':
                case '*':
                case '/':
                case '^':
                    while(precedence(stack[top])>=precedence(symbol))
                    {
                        temp=pop();
                        postfix[pos++]=temp;
                    }
                    push(symbol);
                    break;
                default:
                    postfix[pos++]=symbol;
                    break;
            }
        }
        
        while(top>-1)
        {
            temp=pop();
            postfix[pos++]=temp;
            postfix[pos]='\0';
            
        }
    }
    
    
    
    
    int main()
    {
        cout<<"\nEnter an infix expression:\n";
        cin>>infix;
        infix_to_postfix(infix);
        cout<<"\nThe equivalent postfix expression:\n";;
        cout<<postfix<<endl;;
        return 0;
    }


this is code to covert infix expression to postfix expression 
 when check the  while(precedence(stack[top])>=precedence(symbol))
it it ok if it is tow++ or two** or / or two-- because it check from left but in case of power(^)it begin from the right I did not want if it is tow power(^^)to enter to this loop what can I do please help me 