Skip to content

Instantly share code, notes, and snippets.

@BogdanAriton
Created June 15, 2021 15:24
Show Gist options
  • Save BogdanAriton/4788a71edab3d78a86be2a85bbf6e5dc to your computer and use it in GitHub Desktop.
Save BogdanAriton/4788a71edab3d78a86be2a85bbf6e5dc to your computer and use it in GitHub Desktop.
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