Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct phones {
- int id;
- char brand[8];
- int price;
- int amount;
- } PHONES;
- int main(int argc, char *argv[]) {
- FILE *fin;
- int ch;
- PHONES *phonep[20];
- fin = fopen(argv[1],"r");
- for(i=0; i<50; ++i){
- fscanf(fin, "%d %s %d %d", &phonep[i]->id,&phonep[i]->brand,&phonep[i]->price,&phonep[i]->amount);
- clearBuffer();//This one just passes it on to the next line so it starts at a new item
- }
Add Comment
Please, Sign In to add comment