Created
August 1, 2018 13:24
-
-
Save gallirohik/25fc421b345e178e0d953e6f37865111 to your computer and use it in GitHub Desktop.
Myproject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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