midoking

Song.h

Oct 13th, 2022
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3. #include <iostream>
  4. class Song
  5. {
  6.     std::string name;
  7.     std::string artist;
  8.     int rating;
  9.     friend std::ostream& operator<<(std::ostream &os, const Song &s);
  10. public:
  11.     Song();
  12.     Song(std::string n, std::string a, int c);
  13.     int getRating() const;
  14.     std::string getName() const;
  15.     std::string getArtist() const;
  16.     bool operator==(const Song& rhs) const;
  17.     bool operator<(const Song& rhs) const;
  18. };
  19.  
  20.  
Advertisement
Add Comment
Please, Sign In to add comment