Step 7: Print all elements of the circularly linked list
To print all elements of the list is simple, you need to traverse through the list and output the data of each element.
//Print all items of the Circularly Linked List
void printall(ListElem *L)
cout<<i->data<<"\n";//show the first item
i=i->next; //The element stays immediately next to the pfirts
else cout<<"This is no item.\n";
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: