Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions circular_doubly_linklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ void doubly::display()

void doubly::addtotail(int ele)
{
if(tail==0)
if(tail==0) //if no tail
{
tail=new node(ele);
tail->next=tail;
tail->prev=tail;
}


else
{
tail->next=new node(ele,tail,tail->next);
Expand Down Expand Up @@ -95,12 +94,11 @@ void main()
l1.display();
break;


default:exit(0);
default:exit(0);

}

cout<<"\n\n\tDO U WANT TO CONTINUE?";
cout<<"\n\n\tDO U WANT TO CONTINUE OR WANT TO EXIT?";
cin>>c;
}while(c=='Y'||c=='y');
getch();
Expand Down