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

return 0;

}

int TreeWork::Work(int Task)

{switch (Task)

{case 1 : ElementQuantity=MakeNewList(); break; //Make New List

case 2 : ElementQuantity+=AddElements(); break; //Add Element

case 3 : PrintList(); break; //Print List

case 4 : DeleteElement(); break; //Delete Element

case 5 : SaveList(); break; //Save List

case 6 : ElementQuantity=0; EraseList(); break; //Erase List

case 7 : OpenList(); break; //Open File

case 8 : FindElement(); break; //Find Element

case 9 : SubWork(SubMenu()); break; //Sort List

case 0 : EraseList(); return -1; //Exit

}

return 0;

}

void TreeWork::TreeWorkStart()

{ElementQuantity=0;

do {} while (Work(MainMenu())!=-1);

}

int TreeWork::MakeNewList()

{if (BegP!=NULL)

{cout<<endl<<"You have existing list!"; return 0;}

int Quant;

cout<<endl<<"Input quantity of elements: ";

do

{cin>>Quant;

if (Quant<1)

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