error there’s no matching function for the call to vectorpushback

            OrderEntry* food_order = new OrderEntry (qty, order);
            orderQueue.push_back(food_order);

is wrong because the elements of orderQueue is OrderEntry while you are trying to push OrderEntry* and OrderEntry don’t have constructors that accepts OrderEntry*.

It should be

            OrderEntry food_order = OrderEntry (qty, order);
            orderQueue.push_back(food_order);

or simply

            orderQueue.push_back(OrderEntry (qty, order));

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top