Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help to write a program that uses a structure( SongType ) to store the in

ID: 3618513 • Letter: I

Question

I need help to write a program that uses a structure(SongType) to store the information about a song on a CDincluding: title, album, artist, playing time in minutes andseconds, and music category. I can assume strings for all thefields. The program should read song information from a file calledsongs.dat. Each line in the file will contain one song.Assume there are no more than 200 songs on the file. MY programshould read the data from the file into an array whose elements arethe structure Song. The user should then be allowed toenter the name of an artist (assume the user knows the exactcapitalization and spelling of the name), and the program willoutput all the information for all the songs by that artist. Labelall output properly. Allow the user to search for artist namesuntil they desire to exit. Display a meaningful message if no songsby that artist are found. There will be no spaces in the artistname, and you may assume the file will contain all fields for eachsong. A typical line in the input file might be as follows:

Explanation / Answer

please rate - thanks #include #include #include using namespace std; struct SongType    {string title;    string album;    string artist;    string time;    string category;    }; int main() {char filename[30]; SongType songs[200]; string look; bool found; int cnt=0,i; coutfilename; ifstream input; input.open(filename);          //open file if(input.fail())            //is it ok?        { coutsongs[cnt].title; while(input)    {input>>songs[cnt].album>>songs[cnt].artist>>songs[cnt].time>>songs[cnt].category;      cnt++;      input>>songs[cnt].title;      } coutlook; while(look.compare("exit")!=0)      {cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote