Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to write a program that will read a list of strings from a file into an array...

Reply
Thread Tools

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

 
 
jennifermackles jennifermackles is offline
Junior Member
Join Date: Nov 2012
Posts: 1
 
      11-13-2012
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
I need to write Simple JAVA program to read and write from USB serialto use it with Arduino sahm Java 4 10-15-2012 06:24 PM
convert list of strings to set of regexes; convert list of strings to trie Klaus Neuner Python 7 07-26-2004 07:25 AM
Need to concatenate all files in a dir together into one file and read the first 225 characters from each file into another file. Tony Perl Misc 5 04-19-2004 03:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57