if(strcmp(current->education -> street,current->next->education -> street)>=0)
swap_element(current,end,begin);
else
current=current->next;
}
if(!current->next) end_orend=end;
else
end_orend=end_orend->previous;
}
}
}
//sortirovka po name
void orend_of_name(educational* &end, educational* &begin)
{
educational *end_orend=NULL;
educational *current;
if(end&&begin)
{
while(begin->next!=end_orend)
{
current=begin;
while((current->next!=end_orend))
{
if(strcmp(current->proffs -> name,current->next->proffs -> name)>=0)
swap_element(current,end,begin);
else
current=current->next;
}
if(!current->next) end_orend=end;
else
end_orend=end_orend->previous;
}
}
}
//sortirovka po competition
void orend_of_competition (educational* &end, educational* &begin)
{
educational *end_orend=NULL;
educational *current;
if(end&&begin)
{
while(begin->next!=end_orend)
{
current=begin;
while((current->next!=end_orend))
{
if(current->proffs -> competition-current->next->proffs -> competition>=0)
swap_element(current,end,begin);
else
current=current->next;
}
if(!current->next) end_orend=end;
else
end_orend=end_orend->previous;
}
}
}
//sortirovka po size_pay
void orend_of_size_pay(educational* &end, educational* &begin)
{
educational *end_orend=NULL;
educational *current;
if(end&&begin)
{
while(begin->next!=end_orend)
{
current=begin;
while((current->next!=end_orend))
{
if(current->proffs ->size_pay-current->next->proffs ->size_pay>=0)
swap_element(current,end,begin);
else
current=current->next;
}
if(!current->next) end_orend=end;
else
end_orend=end_orend->previous;
}
}
}
//lichnoe zadanie
// sovokupniy poisk
int line_find_to_COMPETITION_and_NAME_all (educational* begin, double d,char* str1)
{ clrscr();
int count=0;
educational* work=begin;
while(work!=NULL)
if(!(work->proffs->competition==d&&!(strcmp(work->proffs->name,str1)))
{
cout <<work;
count ++;
work=work->next;}
else
work=work->next;
return count;
}
int line_find_to_SIZE_PAY_and_NAME_all (educational* begin,int value,char* str1)
{ clrscr();
int count=0;
educational* work=begin;
while(work!=NULL)
if(!(work->proffs->size_pay==value&&!(strcmp(work->proffs->name,str1)))
{
cout <<work;
count ++;
work=work->next;}
else
work=work->next;
return count;
// menu dlya sortirovki
void menu_of_orending (educational* &begin, educational* &end)
{
int inp1;
char *inp2=new char [25];
do{
clrscr(); //vuvod menu
cout << " REORDERING LIST OF COMPONENTS:" << endl;
cout << " 1 - Street" << endl;
cout << " 2 - City " << endl;
cout << " 3 - Name " << endl;
cout << " 4 - Competition" << endl;
cout << " 5 - Size pay " << endl;
cout << " 6 - OUT LIST OF DISPLAY " << endl;
cout << " 7 - EXIT TO GENERAL MENU " << endl;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.