Added Starter Files
parents
// Project Identifier: CD7E23DEB13C1B8840F765F9016C084FD5D3F130 | ||
/* | ||
A utility file containing a few functor declarations, | ||
the 'Song' data structure, and the overloaded stream insertion | ||
operator for 'Song'. | ||
*/ | ||
// Represents a single song. | ||
struct Song { | ||
std::string name, artist; | ||
unsigned int plays; | ||
class NameSort { | ||
public: | ||
bool operator()(const Song& one, const Song& two) { | ||
return one.name < two.name; | ||
} | ||
}; | ||
class ArtistSort { | ||
public: | ||
bool operator()(const Song& one, const Song& two) { | ||
return one.artist < two.artist; | ||
} | ||
< |