Okay so i am stuck in this particular point in my program.So the program goes as follows:A menu of products shows up(the fuction metProPin(t,&pr[25]) makes it show up by getting the menu of products from a text file) and the user inputs a product code of the product that they want.If they input a right code it asks them for the quantity,if they input a wrong code it shows the list again and the program stops when they input 0.After they have inputed the number of products that they want the program is supposed to show the product number,the product name,the price and the quantity of the product.
The problem is that:1)It only keeps the last input of the product code i give it(so in the file it just shows a bunch of 0s)
2)The rest of the information like the price and the product description is just literally garbage
Some clarifications:
Proion pr[25]->array that is supposed to keep the product info.
kodProion->Product code
periPro[21]->Product name
timiPro->Product price
posothta->Quantity
and N is defined as 5.