Reading files into a array.

Hey guys, I had a homework on my programming class, but I am having a lot of difficulty with it. The project is:

A small market maintains an inventory of exactly 20 items. You will read these items from a file. Each item named will have an associated cost and a character code to indicate whether or not it is taxable. You will place your online order. A file will contain your "printed" receipt with the total amount of your order.

1. Read the inventory: Prompt for and get the input file name, open the file, read the items from the file, and store them into the three parallel arrays. The three arrays will be passed as parameters. (NO GLOBAL VARIABLES) Assume that the file contains exactly 20 lines of input and is constructed correctly. Return 0 to the calling function if the file opens, -1 if the file is not found. If the file is not found, do NOT process the grocery order or attempt to write to the output file.

I am not really sure why the program is not reading my file. Can any of you explain me how to do it?
Duplicated post:

http://www.cplusplus.com/forum/general/189874/

I am not really sure why the program is not reading my file.


Could you post your code to see what is the issue about reading the file?
Last edited on
Topic archived. No new replies allowed.