Aktualizovat du2/program.c

This commit is contained in:
Tomáš Vlček 2026-03-11 10:54:41 +00:00
parent a94dbd8bef
commit cd4f1b0ecf

View File

@ -9,11 +9,6 @@
int najdi_studenta(struct student* students,int size, const char* name); int najdi_studenta(struct student* students,int size, const char* name);
int main() { int main() {
struct student {
char name[SIZE];
int votes;
};
//pomocne premeny //pomocne premeny
struct student databaza[SIZE]; struct student databaza[SIZE];
@ -74,6 +69,11 @@ int najdi_studenta(struct student* students,int size, const char* name)
return -1; return -1;
} }
struct student
{
char name[SIZE];
int votes;
};
int komparator(const void* p1, const void* p2) int komparator(const void* p1, const void* p2)
{ {
struct student* s1 = (struct student*)p1; struct student* s1 = (struct student*)p1;