Реферат: Программирование на С++
cout<
PList=NULL;
return -1;
}
int TreeWork::SortByIncrease()
{
if(BegP==NULL) {cout<
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);
return 0;
}
int TreeWork::SortByDecrease()
{
if(BegP==NULL) {cout<
List *PList1=BegP; PList=BegP;
do
{do {if (PList1->Root->Body 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;
}