- Joined
- Nov 13, 2012
- Messages
- 1
- Reaction score
- 0
How to write a program that will read a list of strings from a file into an array, which size is 30. The program needs to say whether the elements are full, and if there are fewer or more items. The two programs are named Example.txt, and Example2.txt, where Example1.txt has more items and the other has less. It also needs to ask the user to re-enter the file name if the input is invalid. Minimum requirement is to use these two functions: • getInput – gets the file input and puts it into the array. Also determines if there are enough values or too many. Called from main. The function returns a bool value to indicate whether or not reading the file was successful. • openFile – opens the input file for getInput. Called from getInput.