template <class T> class LinkedList; template <class T> class ListElement { T datum; ListElement* next; ListElement (T const&, ListElement*); friend LinkedList <T>; }; template <class T> class LinkedList { ListElement<T>* head; public: LinkedList (); ~LinkedList (); bool IsEmpty () const; T const& First () const; T const& Last () const; void Prepend (T const&); void Append (T const&); void Extract (T const&); void Print (); };How would you declare a linked list of
struct DataType { int position; // (Key) Packet's position w/in message char body[packetSize]; // Characters in the packet int getKey () const { return position; } // Returns the key field };and had declared an object: DataType currPacket
|
|
|