Original code:
#include
#include
class Song { public: Song(std::string name): name(name), nextSong(NULL) {} void next(Song* song) { this->nextSong = song; } bool isRepeatingPlaylist() { throw std::logic_error("Waiting to be implemented"); } private: const std::string name; Song* nextSong; }; #ifndef RunTests int main() { Song* first = new Song("Hello"); Song* second = new Song("Eye of the tiger"); first->next(second); second->next(first); std::cout << std::boolalpha << first->isRepeatingPlaylist(); } #endif
Dashboard
Start Trial
Sign In
Home
Product
Features
Use Cases
Customers
ROI Calculator
Integrations
Assessments
Tests
Questions
Pricing
Resources
Book: Evidence-Based Hiring
Blog
Support
Contact Us
Legal
For Jobseekers
© TestDome, 2024.