Шпаргалка: Реализация списка

if (Number>PT->Body && Number<PT->Body+10)

{cout<<endl<<"Element with this number: "<<endl;

GoThroughTree(PList->Root);

PList=NULL; cout<<endl; return 0;}

PList=PList->LNext;

}

while (PList!=BegP);

cout<<endl<<"There aren't such number in list!"<<endl;

PList=NULL;

return -1;

}

int TreeWork::SortByIncrease()

{

if(BegP==NULL) {cout<<endl<<"Error!"<<endl; return -1;}

List *PList1=BegP; PList=BegP;

do

{do

{if (PList1->Root->Body>PList->Root->Body)

{Tree *PT;

PT=PList1->Root;

PList1->Root=PList->Root;

PList->Root=PT;

PT=NULL;}

PList1=PList1->LNext;

}

while (PList1!=BegP);

PList=PList->LNext;

}

while (PList!=BegP);

К-во Просмотров: 1678
Бесплатно скачать Шпаргалка: Реализация списка