Exercise: create a circularly linked list by using C++ structure.
The circularly linked list is much similar to the singly linked list, except that in the circularly linked list, the last item of the list points to the first item of the list. By allowing the last item points to the first item of the list, the all items of the list are linked together circularly.
In this solution to the exercise, we are going to build a circularly linkedlist that has two pointers--one(pfirst) points to the first item of the list and another one(plast) point to the last item of the list. The program also provides a menu of choices that a user can use do some operations on the linkedlist.
To keep the solution simple, we divide it in to different steps as you see their links on the right menu.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: