So it is correctly converting infix to postfix just in a bad format
for example when I put 55+8 it gives +558 instead of +55 8 how can I change this
where would I change it to fix this problem in my code
Each input token is a distinct object. If you use a string, each distinct object is a char.
Except "55" is composed of two characters. Hence token=char is broken.
Instead, make token=string. Then there is no crossing of token and input boundaries.
"55+8" → "55", "+", "8".
You will need to update your algorithm on lines 29–32 to get all the digits of a number and store them in a single string, then add that to your postfix vector.
A really easy way to deal with all this is to require your input to have spaces between tokens, and use >> to get each one. If your assignment has spaces between each input element, then you can do that. Otherwise you’ll just have to be careful to separate out the digits on lines 29–32.
BTW, postfix puts operators after the operands, so your output should be producing
55 8 +