Source of forTheHeaderFile.h


  1: //  Created by Frank M. Carrano and Timothy M. Henry.
  2: //  Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.

  4: // Additions to the header file:

  6: // Fills the vector bagContents with the data in the nodes of
  7: // the linked chain to which curPtr points.
  8: void fillVector(vector<ItemType>& bagContents, Node<ItemType>* curPtr) const;

 10: // REPLACES the earlier version of getPointerTo:
 11: // Locates a given entry within this bag.
 12: // Returns either a pointer to the node containing a given entry or
 13: // the null pointer if the entry is not in the bag.
 14: Node<ItemType>* getPointerTo(const ItemType& target,
 15:                              Node<ItemType>* curPtr) const;