7 unsigned long int money = 0;
8 unsigned long int num_items = 0;
9 uc num_credit_items = 0;
10 unsigned long int items_sold = 0;
11 struct status_t status[MAX_ITEMS+1];
12 struct credits_t credits[MAX_CREDIT_ITEMS+1];
21 f = fopen("items", "r");
22 for (num_items=0; num_items < MAX_ITEMS && !feof(f); num_items++) {
24 sep = strchr(line, '=');
25 strncpy(status[num_items].item_name, line, sep-line);
26 status[num_items].price = atoi(sep+1);
27 status[num_items].times_sold = 0;
33 status[0].times_sold=23;
34 status[1].times_sold=42;
46 strcpy(status[0].item_name, "cola");
47 status[0].price = 230;
48 status[0].times_sold = 0;
49 strcpy(status[1].item_name, "mate");
50 status[1].price = 150;
51 status[1].times_sold = 0;
56 status[0].times_sold=23;
57 status[1].times_sold=42;
66 void save_credits() {}