I'm having trouble with my program. This program is supposed to convert an infix expression to a postfix expression. The problem is the program still outputs the infix expression. Here are the codes.
void infix2postfix(char infix[], char postfix[], int s);
int pr_token(char token);
int main ()
{
int s;
char infix[20];
cout<<"Enter an expression in infix: ";
cin.getline(infix, 20);
s = strlen(infix);
char postfix[s];
infix2postfix(infix, postfix, s);
cout<<"Postfix Expression is: "<<postfix;
return 0;
}