Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void searchz(list *h, list **h2, list **last2)
- {
- list *p = h;
- system("cls");
- while(p)
- {
- if (strcmp(p->info.pos,"RB")==0 || strcmp(p->info.pos,"CB")==0 || strcmp(p->info.pos,"LB")==0)
- if (h2==NULL)
- {
- add_start1(h2,last2,p->info.name);
- }
- else
- {
- add_end1(last2,p->info.name);
- }
- p = p -> next;
- }
- system("pause");
- system("cls");
- }
- void add_start1(list **h2, list **last2, char *g)
- {
- list *p = (list*)malloc(sizeof(list));
- strcpy_s(p->info.pos, 1 ,NULL);
- strcpy_s(p->info.surname, 1 ,NULL);
- strcpy_s(p->info.league, 1 ,NULL);
- strcpy_s(p->info.name, 100 ,g);
- if (!*h2)
- *last2 = p;
- p->next = *h2;
- *h2 = p;
- }
- void add_end1(list **last2, char *g)
- {
- list *p = (list*)malloc(sizeof(list));
- system("cls");
- strcpy_s(p->info.name, 100 ,g);
- (*last2)->next = p;
- p->next = NULL;
- *last2 = p;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement