#include<queue>
or
#include<algorithm>
?
I noticed in the code that you presented to me it had errors compiling on lines 82 and 84. And why do I need the system("pause"); wouldn't a cout or something be good?
No you don't need the two includes. They're only necessary if you are using them and their functionality in your program and I can't see where they are. You can also test it by simply commenting them out on yours if you like and making sure you get the results you want.
I have fixed the two errors. I was using VS2015 and your program ran OK but the online compiler here was a bit more fussy. I've checked it here this time and it's all good.
system ("pause") is just there for a convenience but can be left out if your don't like it and it's not necessary for running your program online here, so I've deleted it.
Thank you very much for the help, I know it was probably taxing for you to answer all my dumb questions haha. So to clarify, the code you've written works, just the compiler on this website is iffy?
No they weren't dumb questions. I haven't adjusted VS2015 from the defaults so I just put it down to Microsoft being more tolerant than the shell here. I usually check if it works online but forgot to this time and it bit me. :) / :[