having the error in the header in visual studios everytime i call dequeue function. pop function works for stack but when it comes to queues it doesnt work and error comes while debugging.
in queue.cpp
std::string &Queue::dequeue()
{
    if (inbox.isEmpty(inbox))
    {
        std::cout << "The queue is empty!";
        return inbox.pop(inbox);
    }
    else
        return inbox.pop(inbox);
}
in stack.cpp
bool stack::isEmpty(stack& stack1)
{
    if (stack1.value =="")
        return true;
    else
        return false;
}
std::string stack::pop(stack &stack1)
{
    if (isEmpty(stack1))
    {
        std::cout << "The stack is empty ";
        return stack1.value;
    }
    else
    {
        if(stack1.next != NULL)
        {
            std::string val1 = stack1.value;
            stack1 = *stack1.next;
            return val1;
        }
        else
        {
            std::string val2 = stack1.value;
            stack1.value="";
            stack1.next = NULL;
            return val2;
        }
    }
}
 
    