subject

TV show information can either keep track of the number of viewers per show or the name of a show. Information is kept in a file (see sample files below). If the first line of the file says Show, we should store the names of the shows. If the first line of the file says Viewer, we should store the number of viewers per show.

Create a class to complete the program below.
int main(int argc, char** argv) Tv_show_info Tv_show_info show_names(argv[2]);
int n=viewers. info. at(0);
std::string s=show_names. info. at(0);

Sample input file 2: Viewer Sample input file 1: Show Stranger Things Game of Thrones Black Mirror 34 100

its not provided, we are to recreate it. but this is what i made..

template
class Tv_show_info
{
public:
// template
Tv_show_info(string & file):
filename{file}
{
ifstream myfile {filename};
vectorinfo;
T lines;
while (getline(myfile, lines))
{
info. push_back(lines);
}
}
private:
string filename;
};

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, 710jonathan
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, puppylove899
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
image
Computers and Technology, 23.06.2019 05:20, jaylenmiller437
Which operating system is a version of linux?
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
You know the right answer?
TV show information can either keep track of the number of viewers per show or the name of a show. I...

Questions in other subjects:

Konu
Mathematics, 14.07.2019 02:40
Konu
Mathematics, 14.07.2019 02:40