I attached the code because it's too long to post and I can't figure out what's wrong with what
basically I'm writing a program that inputs polynomials then lets you add and subtract them (format is like this: 3x3+2x2+1x1+3). I have two problems:
1) my sort function isn't working at all. I've never used sorting with linked lists so I think it's a logical error. but I can't figure out how to fix it
2) whenever I try to output any polynomial I've inputted it outputs a random number at the end, but only if the last term in the polynomial isn't a constant
please check out the code I attached. mostly you need to look at the input function I think, but I'm not sure. I didn't add the definition for the + operator overload because it's very long and I don't use it in my main yet