struct Product{
/* declare variables here to store product data */
char product_name[LEN];
int product_id;
int quantity;
double unit_price;
int expire_month, expire_year;
struct Product *next;
};
pfile=fopen("binary.bin","wb");
if(pfile!=NULL)
{
while(head != NULL)
{
fwrite(&head, sizeof(struct Product), 1, pfile);
//head=head->next;
}
fclose(pfile);
puts("File Saved successfully!");
system("pause");
}
else
{
puts("File not found");
system("pause");
}
pls help ,i cant get it working..