void my_int_sllist::pop_back()
{
//head and tail pointers
cout<<"enter pop_back";
//contains one node
if(head==tail)
{
cout<<"enter head==tail?";
delete head;
head=tail=0;
siz--;
}
else
{
cout<<"enter's other condition";
my_int_node* temp;
for(temp=head; temp->next!=tail; temp=temp->next)
{
delete tail;
tail=temp;
tail->next=0;
}
siz--;
}
}
lotrsimp12345 37 Posting Pro in Training
VernonDozier 2,218 Posting Expert Featured Poster
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
VernonDozier 2,218 Posting Expert Featured Poster
lotrsimp12345 37 Posting Pro in Training
VernonDozier 2,218 Posting Expert Featured Poster
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.