initializacia
This commit is contained in:
parent
f314b8479f
commit
3cbf4047a2
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user