im not using arrays? or pointers, just stacks |
Hmmmm,
std::vector 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.
Hmmmm,
std::queue is a container adaptor, a wrapper usually around a
std::list.
std::lists 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,
abrt,
namehere,
presedence,
oprators 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.
http://www.sscce.org/
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.