Oh, thanks for clearing that up...
btw, Elysia, I have this function to add a new product:
Code:
void add_product(product *p) {
printf("Enter product description : ");
gets(p->name);
printf("Enter price per unit (cent) : ");
scanf("%f", &p->price);
printf("Enter stock level: ");
scanf("%d", &p->quantity);
}
if I wanted to modify just the price, would the following function work? (Thats assuming I moved the offset to the start of the product structure)...
Code:
void edit_price(product *p) {
printf("Enter price per unit (cent) : ");
scanf("%f", &p->price);
}
The code is pretty much the same apart the left out name and quantity parts...