Реферат: Программирование на С++
{if (BegP==NULL)
{MakeNewList(); return 0;}
int Quant;
cout<
do
{cin>>Quant; if (Quant<1) cout< }
while (Quant<1);
for (int i=0; i
{cout< int Digit; cin>>Digit; PList=new List(Digit); List *PList1=BegP->LPrev; if (PList1==BegP) {BegP->LNext=PList; BegP->LPrev=PList; PList->LPrev=BegP; PList->LNext=BegP; PList1=NULL; PList=NULL;}
else
{BegP->LPrev=PList; PList->LNext=BegP; PList->LPrev=PList1; PList1->LNext=PList; PList=NULL; PList1=NULL;}
}
return Quant;
}
int TreeWork::PrintList()
{if (BegP==NULL) {cout<
cout<
PList=BegP;
int i=1;
do
{cout< GoThroughTree(PList->Root); cout< i++; PList=PList->LNext;}
while (PList!=BegP);
return 0;
}
void TreeWork::GoThroughTree(Tree *L)
{Tree *PL=L, *PL1; if (PL->LP!=NULL) {PL1=PL; PL=PL->LP; cout<<"("< Body<<","< Body<<") "; GoThroughTree(PL);}
if (PL->RP!=NULL)
{PL1=PL; PL=PL->RP; cout<<"("< Body<<","< Body<<") "; GoThroughTree(PL);}
}
void TreeWork::Erase(Tree *L)