This commit is contained in:
Michaela Šaková 2019-03-23 20:25:18 +01:00
parent 43632bf685
commit 83ee8f9add
3 changed files with 3 additions and 4 deletions

BIN
anketa

Binary file not shown.

View File

@ -14,14 +14,13 @@ return i;
} }
int search(struct student* students,const char* name){ int search(struct student* students,const char* name){
int index=-1;
for(int i=0; i<MAXSTUDENTS; i++){ for(int i=0; i<MAXSTUDENTS; i++){
if(strcmp(students[i].name,name)==0){ if(strcmp(students[i].name,name)==0){
index=i; return i;
break;
} }
} }
return index; return -1;
} }
int add_student(struct student* students, const char* name, int votes){ int add_student(struct student* students, const char* name, int votes){

BIN
anketa.o

Binary file not shown.