.:Pudge:. 0 Light Poster

I don't know how to properly override this function when it comes to an Iterator for a linked list.

ListIterator operator++(){
               currentPtr->prev=currentPtr;
		 currentPtr=currentPtr->next;
               currentPtr->next=currentPtr->next->next;              
               return *this;
               }  // advance iterator to the next list node; return value is iterator *after* advancing  
  ListIterator operator--(){
               currentPtr->next=currentPtr;
		 currentPtr=currentPtr->prev;
               currentPtr->prev=currentPtr->prev->prev;
               return *this;
               }  // advance iterator to the previous list node; return value is iterator *after* advancing
  ListIterator operator++(int){
               
               }  // advance iterator to the next list node; return value is iterator *before* advancing
  ListIterator operator--(int){
              
               }  // advance iterator to the previous list node; return value is iterator *before* advancing
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.