forked from brmlab/brmbar-github
fill items
This commit is contained in:
parent
cd804dcd45
commit
0c25b1467c
1 changed files with 8 additions and 2 deletions
10
brmbar.c
10
brmbar.c
|
@ -1,6 +1,12 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void read_items()
|
struct item {
|
||||||
|
char *ean;
|
||||||
|
char *name;
|
||||||
|
int price;
|
||||||
|
} items[100];
|
||||||
|
|
||||||
|
void fill_items()
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
FILE *f = fopen("items.txt", "r");
|
FILE *f = fopen("items.txt", "r");
|
||||||
|
@ -12,6 +18,6 @@ void read_items()
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
read_items();
|
fill_items();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue