c++how to check if queue is empty stl code example
Example: check if queue is empty c++
while (!myqueue.empty())
{
sum += myqueue.front();
myqueue.pop();
}
while (!myqueue.empty())
{
sum += myqueue.front();
myqueue.pop();
}