How to write a program that will read a list of strings from a file into an array...

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top