Реферат: Программирование на С++
if (PL->RP!=NULL)
{PL=PL->RP;
Erase(PL);}
PL->LP=NULL;
PL->RP=NULL;
}
void TreeWork::EraseList()
{if (BegP!=NULL)
{do
{List *PList1=BegP->LNext;
PList=PList1->LNext;
BegP->LNext=PList;
PList->LPrev=BegP;
Erase(PList1->Root);
delete [] PList1;
}
while (PList!=BegP);
BegP=NULL; PList=NULL;
}
}
int TreeWork::DeleteElement()
{cout< int Number=0; cin>>Number; if (Number>ElementQuantity || Number<0) {cout<
Number--;
PList=BegP;
for (int i=0; i
PList=PList->LNext;
List *PList1=PList->LNext, *PList2=PList->LPrev;
if (PList==BegP)
{PList1->LPrev=PList2; PList2->LNext=PList1; PList->LNext=NULL; PList->LPrev=NULL; delete [] PList; BegP=PList1; PList1=NULL; PList2=NULL;}
else
{PList1->LPrev=PList2; PList2->LNext=PList1; PList->LNext=NULL; PList->LPrev=NULL; delete [] PList; PList1=NULL; PList2=NULL;}
ElementQuantity--;
return 0;
}
int TreeWork::FindElement()
{cout< int Number=0; cin>>Number; PList=BegP; do {Tree *PT=PList->Root; if (Number>PT->Body && Number Body+10) {cout< GoThroughTree(PList->Root); PList=NULL; cout<
PList=PList->LNext;
}