|
@@ -16,7 +16,6 @@ class CircleList: public List<T>
|
|
Node<T>* currentNode = this->start;
|
|
Node<T>* currentNode = this->start;
|
|
for(int i = 0; i < this->lenght; i++)
|
|
for(int i = 0; i < this->lenght; i++)
|
|
{
|
|
{
|
|
- std::cout << currentNode->value << std::endl;
|
|
|
|
currentNode = currentNode->next;
|
|
currentNode = currentNode->next;
|
|
delete currentNode->prev;
|
|
delete currentNode->prev;
|
|
}
|
|
}
|
|
@@ -45,6 +44,7 @@ class CircleList: public List<T>
|
|
}
|
|
}
|
|
|
|
|
|
void pop(Node<T>* n) {
|
|
void pop(Node<T>* n) {
|
|
|
|
+ if (n == this->start) this->start = this->start->next;
|
|
this->List<int>::pop(n);
|
|
this->List<int>::pop(n);
|
|
}
|
|
}
|
|
|
|
|