Question: Write a program that requests a file name, tests for file opening, reads in the lines from the text file and displays them with line

Write a program that requests a file name, tests for file opening, reads in the lines from the text file and
displays them with line numbers and a colon (file contents below). Limit the display to 24 lines at a time
per the text instructions (press a key). Two (2) cin.get() functions may be required to pause correctly.
The output of the line numbers will be right aligned as shown below. The program may be handled
solely in main. The text for the file is below.
line 1 from the file
line 2
line 3
line 4
---
Write a program that
reads in the
lines from a text file
and displays
them with line numbers
and a colon.
Limit the display to 24
lines at a time
per the instructions.
You can hard code the
file name if
needed.
---
Write a program that
reads in the
lines from a text file
and displays
them with line numbers
and a colon.
Limit the display to 24
lines at a time
per the instructions.
You can hard code the
file name if
needed.
---
I need help, Using visual studios writing it in C++

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!