Created
June 15, 2021 15:24
-
-
Save BogdanAriton/4788a71edab3d78a86be2a85bbf6e5dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void printList() const | |
{ | |
if (isEmpty()) | |
{ | |
std::cout << "Empty list" << '\n'; | |
} | |
else | |
{ | |
Node *current = head.get(); | |
while (current != nullptr) | |
{ | |
std::cout << std::string(*current) << '\n'; | |
current = current->next.get(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment