diff --git a/cv2/program.c b/cv2/program.c index 93d2060..2e9c03d 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -18,17 +18,8 @@ int read_pizza_list(struct pizza* list){ } } -int read_item(struct pizza *item) { - static int currentIndex = 0; +int read_item(struct pizza* list) { - if (currentIndex >= sizeof(menu) / sizeof(menu[0])) { - return 0; - } - - memcpy(item, &menu[currentIndex], sizeof(struct pizza)); - currentIndex++; - - return 1; }