Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ please Write a program that creates an array to hold a structure named SongData to store the following information about a song: Title

in c++ please

Write a program that creates an array to hold a structure named SongData to store the following information about a song:

Title (char array - 101 characters)

Artist (char array - 101 characters)

Year Released (integer)

You may not use strings!

The program should create a SongData array with a maximum size of 50, and pass it to a function loadSongs() to read in song data from a songs.txt file. The function should update a variable in main() which keeps track of the number of songs read into the array. The array is then passed to printSongData() that displays the information about each song as formatted below.

songs.txt input file:

At Last;Etta James;1960 Hungry Like the Wolf;Duran Duran;1982 Blitzkrieg Bop;Ramones;1976 Take On Me;A-ha;1985 London Calling;The Clash;1979 Crazy Mary;Pearl Jam;1993 Wild Horses;The Rolling Stones;1971 Strawberry Letter 23;Shuggie Otis;1971 How Many More Times;Led Zeppelin;1969 I Say A Little Prayer;Aretha Franklin;1968 

the output is:

At Last Etta James 1960 Hungry Like the Wolf Duran Duran 1982 Blitzkrieg Bop Ramones 1976 Take On Me A-ha 1985 London Calling The Clash 1979 Crazy Mary Pearl Jam 1993 Wild Horses The Rolling Stones 1971 Strawberry Letter 23 Shuggie Otis 1971 How Many More Times Led Zeppelin 1969 I Say A Little Prayer Aretha Franklin 1968

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions