Need help with the second part of this C assignment Here is
Need help with the second part of this C++ assignment.
Here is the assignment:
http://docdro.id/7CAjSlg
Solution
#include <iostream>
#include <fstream>
#include <string>
#include \"Song.h\"
using namespace std;
int option;
int menu();
int counter = 0;
Song collection[200];
int menu()
{
cout << \"What do you want to do\" << endl;
cout << \"1. Add a song\" << endl;
cout << \"2. Remove a song\" << endl;
cout << \"3. Display all the songs in the list\" << endl;
cout << \"4. Quit\" << endl;
cin >> option;
switch (option) {
case 1:
cout << \"\ Add a song\" << endl;
void AddSong (int counter);
counter++;
break;
case 2:
cout << \"\ Remove a song\" << endl;
void Remove();
break;
case 3:
cout << \"\ Display a song\" << endl;
void Display();
break;
case 4:
cout<< \"\ Quit\" << endl;
void Exit();
break;
default:
cout << \"\ Input a value between 1-4\" << endl;
return menu();
}
void Addsong(int counter)
{
cout << \"\ Enter song title:\" << endl;
getline(cin, ttl);
collection[counter].setTitle(ttl);
cout << \"\ Enter song artist:\" << endl;
getline(cin, art);
collection[counter].setArtist(art);
cout << \"\ Enter song album:\" << endl;
getline(cin, alb);
collection[counter].setAlbum(alb);
return menu();
}
void Remove(int counter);
{
}
void Display(int counter);
{
}
void Exit()
{
}
For attaching file we also can use: pFileTXT = fopen (\"aTextFile.txt\",\"a\");


