Skip to content

Instantly share code, notes, and snippets.

@gallirohik
Created August 1, 2018 13:24
Show Gist options
  • Select an option

  • Save gallirohik/25fc421b345e178e0d953e6f37865111 to your computer and use it in GitHub Desktop.

Select an option

Save gallirohik/25fc421b345e178e0d953e6f37865111 to your computer and use it in GitHub Desktop.
Myproject
#include<iostream>
#include "Song.h"
#include<vector>
using namespace std;
class AllSongs{
private:
vector<Song> Songs;
int count;
void setCount(){
count=0;
}
public:
void displaySongs();
int AddSong(Song newSong);
int deleteSong();
};
void AllSongs::displaySongs()
{
Song s;
s=Songs[0];
cout<<s.getName();
}
int AllSongs::AddSong(Song newSong)
{
this->Songs.push_back(newSong);
count++;
}
int main()
{
Song s("kwaja","AR","dev",5.25);
s.getDetails();
AllSongs all;
all.AddSong(s);
all.displaySongs();
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment