dimanche 3 mai 2020

Overloading Pre-Increment Operator

Here is the declaration:

 Iterator operator++();//pre-increment

Here is the definition:

LinkedList::Iterator& LinkedList::Iterator::operator++(){
   return Iterator(current->next);//this is giving me an error
}

Aucun commentaire:

Enregistrer un commentaire