View the step-by-step solution to:

two parts to this project for c++. part 1 Add a new function to your project called: ReverseIt() From the main function call ReverseIt().

two parts to this project for c++.
part 1
• Add a new function to your project called: ReverseIt()
• From the main function call ReverseIt().
• ReverseIt will create an array to hold 10 integers, open your input file, read each line, add the integer on
each line into the array. Close the input file.
• At this point, ReverseIt function has an array of 10 integers that it read from the file.
• Now open an output file called ReverseArray.txt, and write the array elements into the file in reverse
order. In other words, the last integer that you read from your StraightArray.txt will be the first integer
in this ReverseArray.txt file


and

part 2
• Add a new function to your project called: ReverseIt()
• From the main function call ReverseIt().
• ReverseIt will open StraightStrings.txt as input file and open a ReverseStrings.txt file as output file.
• It will read one line of the input file and put its string into a character array.
• Then write the character array in reverse order into the output file:
o Example: input string = “Hello World” Î output string to output file = “dlroW olleH”
• Note: this is done one string at a time. You are not reading all the input file strings into an array, then
processing them. You are reading one string from the input file, and then writing it to the output file
Sign up to view the entire interaction

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question