CS 304 Homework 2: C++ bag ADT implementation