else { cout <<work;
work=work->next;
count ++;
}
return count;
}
Vacancy* line_find_to_post (Vacancy* current, char* str)
{
Vacancy* work=current;
while (work!=NULL)
if (strcmp(work-> post,str)) work=work->next;
else break;
return work;
}
int line_find_to_post_all (Vacancy* begin, char* str)
{
int count=0;
Vacancy* work=begin;
while (work!=NULL)
if (strcmp(work-> post,str)) work=work->next;
else { cout <<work;
work=work->next;
count ++;
}
return count;
}
int line_find_to_this_parametr_all (Vacancy* begin, char* str2, char* str3, char* str4,int z)
{
int count=0;
Vacancy* work=begin;
while (work!=NULL)
if (strcmp(work-> expert ->education,str2), strcmp(work-> expert ->profession,str3), strcmp(work-> post,str4), work->offer->min_wages!=z) work=work->next;
else { cout <<work;
work=work->next;
count ++;
}
return count;
}
int delete_to_city (Vacancy* &begin, Vacancy* &end, char* str)
{
Vacancy* work=begin;
int count=0;
while (work!=NULL) {work=line_find_to_city (work,str);
if (work!=NULL)
{delete_element (work, begin);
if ((work==NULL)&&(begin!=NULL)) work=begin;
count++;
}
}
end=find_to_end(begin);
return count;
}
int delete_to_min_wages (Vacancy* &begin, Vacancy* &end, int min_wages)
{
Vacancy* work=begin;
int count=0;
while (work!=NULL) {work=line_find_to_min_wages (work, min_wages);
if (work!=NULL) {delete_element (work, begin);
count++;
}
}
end=find_to_end(begin);
return count;
}
int delete_to_education (Vacancy* &begin, Vacancy* &end, char* str)
{
Vacancy* work=begin;
int count=0;
while (work!=NULL) {work=line_find_to_education (work,str);
if (work!=NULL) {delete_element (work, begin);
count++;
}
}
end=find_to_end(begin);
return count;
}
int delete_to_profession (Vacancy* &begin, Vacancy* &end, char* str)
{
Vacancy* work=begin;
int count=0;
while (work!=NULL) {work=line_find_to_profession (work,str);
if (work!=NULL) {delete_element (work, begin);
count++;
}
}
end=find_to_end(begin);
return count;
}
int delete_to_post (Vacancy* &begin, Vacancy* &end, char* str)
{
Vacancy* work=begin;
int count=0;
while (work!=NULL) {work=line_find_to_post (work,str);
if (work!=NULL) {delete_element (work, begin);
count++;
}
}
end=find_to_end(begin);
return count;
}
void out_of_display(Vacancy* begin)
{
//clrscr();
Vacancy* work=begin;
while (work!=NULL)
{ if (wherey()>20) {//wait_key();
//clrscr();
}
cout << work;
work=work->next;
}
cout <<endl<< "Total in list "<< count_to_list(begin)<< " elements!"<<endl;
wait_key();
}
void save_list (Vacancy *begin, char * spisok)
{
Vacancy *work=begin;
int count=count_to_list(begin);
ofstream out_file(spisok);
if (out_file) { out_file << count << endl;
for (int i=0; i<count; i++) {
out_file << work->name<<endl;
out_file << work->firm->city<<endl;
out_file << work->firm->street<<endl;
out_file << work->firm->house<<endl;
out_file << work->post<<endl;
out_file << work->offer->min_wages<<endl;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.