diff --git a/cv1/program.c b/cv1/program.c index 63a1101..5e620a8 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -14,10 +14,11 @@ void trim(char* str); int search_string(const char* heap, const char* needle); int read_pizza(struct pizza* item); char hacker_script(char c); + int main(){ struct pizza jedalny_listok[POCET_JEDAL]; memset(jedalny_listok, 0,sizeof(struct pizza)*POCET_JEDAL); - int counter; + int counter=0; char line[LINE_SIZE]; memset(line,0,LINE_SIZE); printf("Zadaj hladanu surovinu:\n"); @@ -26,7 +27,6 @@ int main(){ if(r != NULL && line[1] != 0){ printf("Zadaj jedalny listok\n"); struct pizza item; - counter=0; while(read_pizza(&item)){ strcpy(jedalny_listok[counter].name, item.name); jedalny_listok[counter].prize=item.prize; diff --git a/cv1/program.exe b/cv1/program.exe index 5bfd8a7..093dfc1 100644 Binary files a/cv1/program.exe and b/cv1/program.exe differ