updated filestructure and gitignore. uploading exam progress
This commit is contained in:
19
Exam/IKT203Exam/Portfolio/Assignment-01/option2.cpp
Normal file
19
Exam/IKT203Exam/Portfolio/Assignment-01/option2.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// Option 2 (Advanced): Console Music Player.
|
||||
|
||||
#include <iostream>
|
||||
#include "option2.h"
|
||||
|
||||
static bool SongReadCallback(const int aIndex, const int aTotalCount, const std::string& aArtist, const std::string& aTitle, const std::string& aYear, const std::string& aGenre, const std::string& aSource) {
|
||||
// Implement the logic to process each song read from the file
|
||||
// For example, print the song details to the console
|
||||
std::cout << "Song " << (aIndex + 1) << " of " << aTotalCount << ":\n";
|
||||
std::cout << " Artist: " << aArtist << "\n";
|
||||
std::cout << " Title: " << aTitle << "\n";
|
||||
std::cout << " Year: " << aYear << "\n";
|
||||
std::cout << " Genre: " << aGenre << "\n";
|
||||
std::cout << " Source: " << aSource << "\n\n";
|
||||
// Return true to continue reading more songs
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user