|im not using arrays? or pointers, just stacks|
is a sequence container
that encapsulates dynamic size arrays
A regular array is a sequence container, so yeah, you are using arrays. An array you could be going out of bounds when accessing elements.
is a container adaptor, a wrapper usually around a std::list
s are sequence containers
that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions.
There's that "sequence container" designation again. Random access of a std::list
's elements isn't possible, it is a different interface of a sequential container.
Hint, hint an array with different ways to access the elements.
You say you are using a stack? A std::stack
and a std::queue
are two different containers, how the elements are accessed is pretty much the key differences. LIFO vs. FIFO.
You are using std::queue
I see variables and what could be functions used in main without seeing where they are instantiated or defined. again
are what stand out with a cursory read through, there may be others.
Your formatting is not consistent, that certainly doesn't help reading and understanding your code.
Code that isn't SSCCE, a Short, Self Contained, Correct (Compilable), Example.
I certainly don't want to spend time adding bits and pieces of code to get this to work, such as including <header> files. Bits and pieces I could get wrong.