## 24.4.3 Searching Algorithms - `find` (cont.)

- From last chapter:

  >     void Inventory::receive(Product newp)
  >     {
  >        cout << "Received Shipment of product "
  >           << newp << "\n";
  >        list<int>::iterator we_need =
  >           find(on_order.begin(), on_order.end(), newp.get_id());
  >        if (we_need != on_order.end())
  >        {
  >           cout << "Ship " << newp
  >              << " to fill back order\n";
  >           on_order.erase(we_need);
  >        }
  >        else
  >           on_hand.push_front(newp);
  >     }

prev |top |next