added functions
This commit is contained in:
parent
f3ab5d2efd
commit
e0ca79c4d0
11
vendorInfo.c
11
vendorInfo.c
|
@ -63,6 +63,7 @@ int main()
|
|||
int total_vendors = index - 1;
|
||||
printf("\n>>> Read %d vendors from file %s\n", total_vendors, file_name);
|
||||
|
||||
// print out each vendor's info
|
||||
for (int i = 0; i <= total_vendors; i++)
|
||||
{
|
||||
char vendor_info[200];
|
||||
|
@ -80,6 +81,9 @@ int main()
|
|||
printf("%-50s %s\n", vendor_info, vendor_stock);
|
||||
}
|
||||
|
||||
char user_purchase[50];
|
||||
|
||||
|
||||
fclose(fp);
|
||||
free(file_buffer);
|
||||
return 0;
|
||||
|
@ -100,3 +104,10 @@ int read_input(char str[], int n)
|
|||
str[i] = '\0';
|
||||
return i;
|
||||
};
|
||||
|
||||
int purchase(struct vendor_item vendors, int index, char str[], int amount)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue