This commit is contained in:
Zoltán Szabó 2020-04-17 11:10:14 +02:00
parent f091d27813
commit df4b43a5e4

View File

@ -60,12 +60,8 @@ int main(int argc, char const *argv[])
} }
} }
if(loaded==0){ if(size==0){
puts("Ziadne prihlasky"); puts("Ziadne prihlasky");
for(int i=0; i<SIZE; i++){
free(students[i]);
}
return 0;
} }
@ -74,12 +70,9 @@ int main(int argc, char const *argv[])
puts("Prijati studenti:"); puts("Prijati studenti:");
for(int i=0; i<size; i++) for(int i=0; i<size; i++)
puts(students[i]); puts(students[i]);
puts("Neprijati studenti:");
if(size!=loaded){ for(int i=size; i<loaded; i++)
puts("Neprijati studenti:"); puts(students[i]);
for(int i=size; i<loaded; i++)
puts(students[i]);
}
for(int i=0; i<SIZE; i++){ for(int i=0; i<SIZE; i++){
free(students[i]); free(students[i]);