The first OpenFile() should be pretty easy. Use the new operator to allocate menory for an array of ifstream objects, open each of the files, then return the array.
The second function is a little more complicated. You will need a loop to read one line from each file in each loop iteration.
Would I write the program for you? I could, but I won't. You give it a try and post the code you have written, then ask questions about what you do not understand.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,951 posts
since Aug 2005