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: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 25.06.2019 08:00
Is skill in using productivity software, such as word processors, spreadsheets, database management systems, and presentation software.computer literacyinformation literacybusiness literacynetwork literacy
Answers: 1
question
Computers and Technology, 25.06.2019 10:40
If you're using the paintbrush tool and want to change the color of the paint being used what should you change
Answers: 2
question
Computers and Technology, 25.06.2019 15:00
What feature allows users to collaborate on a document by marking the edits one author makes for the other to see?
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
question
Mathematics, 05.04.2020 22:50
question
Mathematics, 05.04.2020 22:50
question
Mathematics, 05.04.2020 22:51
question
History, 05.04.2020 22:52
question
History, 05.04.2020 22:52
Questions on the website: 13722360