I'm trying to write a program but I can't figure out how to do it. Maybe someone can help me out.
Here are the specs for my program:
I am writing a program for inputting and storing inventory prices. This program will assume there are 5 different inventory items: Bread, Milk, Eggs, Cheese, and Bacon. These items must be initialized as strings using an array of pointers. The program should also have an array of 5 floating point variables to store the prices of the items.
1) When writing the code, I want to print each item, one by one, and request that the user input the price for that item.
2) Store the user price input in the array of floating point variables.
3) Write a function called Store_Prices that is passes both the array of inventory item names and the array of prices. This function should open a disk file called “data.txt”, and write the inventory price data as:
4) Call the “Store_Prices” function to store the prices to disk.