Check out example codes for "how to have a queue as a parameter in c++". It will help you in understanding the concepts better.

Code Example 1

void myFunc(std::queue<MyClass*>& myQueue)
{
   //do something
}

Learn ReactJs, React Native from akashmittal.com