Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

https://www.dropbox.com/sh/gm5srndm53a7o9s/AACGdSwiXmZdGfQwf2jSHJrQa/Week-09?dl=0&preview=movies.txt The program should input the name of the file from the keyboard: movies.txt Output should be number of movies, first movie name, and last

https://www.dropbox.com/sh/gm5srndm53a7o9s/AACGdSwiXmZdGfQwf2jSHJrQa/Week-09?dl=0&preview=movies.txt

The program should input the name of the file from the keyboard:

movies.txt

Output should be number of movies, first movie name, and last name movie:

100

The Shawshank Redemption(1994)

Witness for the Prosecution(1957)

PLEASE USE THE FOLLWOWING TEMPLATE:

string moviename;

getline(file, moviename);// read entire line as the movie name:

getline(file, moviename);// read first movie:

while(!file.eof())//while not EOF marker:

{

.

.

.

getline(file, moviename);// read next movie (will be empty string @ EOF):

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How would you describe your typical day at work?

Answered: 1 week ago