diff --git a/du4/program.c b/du4/program.c index 112ff22..df7eccc 100644 --- a/du4/program.c +++ b/du4/program.c @@ -81,7 +81,10 @@ int main() { students[count++] = createStudent(name, count_of_vote); } } - + if(count == 0) { + printf("Nepodarilo nacitat nic\n"); + return 0; + } // Zoradenie študentov podľa počtu hlasov a mena qsort(students, count, sizeof(Student), compare_students);