void Publish::show() { Author *p = head; while (p) { cout << "Name: " << p->getName() << endl; cout << "Lastname: " << p->getLastname() << endl; cout << "Type: Book" << endl; cout << "Title: " << p->getTitle() << endl; cout << "Number of pages: " << p->getKol() << endl; p = p->next; } }