Hello! I can’t for the life of me figure out what it’s asking for….

Question Answered step-by-step Hello! I can’t for the life of me figure out what it’s asking for…. Hello! I can’t for the life of me figure out what it’s asking for.  Write code to read a list of song durations and song names from input. For each line of input, set the duration and name of newSong. Then add newSong to songsList. Input first receives a song duration, then the name of that song. Use getline() to read in the name.  Input example: 424 Time383 Money-1 #include #include #include using namespace std;class Song {  public:     void SetDurationAndName(int songDuration, string songName) {        duration = songDuration;        name = songName;     }     void PrintSong() const {        cout << duration << " - " << name << endl;     }     int GetDuration() const { return duration; }     string GetName() const { return name; }  private:     int duration;     string name;};int main() {  vector songsList;  Song newSong;  int songDuration;  string songName;  unsigned int i;  cin >> songDuration;  while (songDuration >= 0) {       /* Your code goes here */      cin >> songDuration;  }  for (i = 0; i < songsList.size(); ++i) {     newSong = songsList.at(i);     newSong.PrintSong();  }  return 0;} Computer Science Engineering & Technology C++ Programming CS 210 Share QuestionEmailCopy link Comments (0)