// MyLinkedBag.h - wdg 2008 #ifndef MY_LINKED_BAG_H #define MY_LINKED_BAG_H #include using namespace std; typedef int ListType; // produces a bag of ints struct BagNode { ListType data; BagNode *next; }; class MyLinkedBag { public: MyLinkedBag(); ~MyLinkedBag(); // should be virtual; discussed later void add(ListType x); bool remove(ListType x); bool isEmpty() const; friend ostream & operator<< ( ostream & , const MyLinkedBag & ); private: BagNode *head; // head of the list }; #endif