Шпаргалка: Реализация списка
Number--;
PList=BegP;
for (int i=0; i<Number; 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<<endl<<"Input number, you want to find: ";
int Number=0;
cin>>Number;
PList=BegP;
do