4 #include "../boys/boy.h" 5 #include "../girls/girl.h" 6 #include "../gifts/gift.h" 7 #include "../couples/couple.h" 8 #include "../utils/read_data.h" 9 #include "../utils/couple_utils.h" 10 #include "../utils/logger/logger.h" 12 #include "../configs.h" 15 int main(
int argc,
char **argv)
23 logger.
info(
"Processing for question 1",
true);
24 logger.
log(
"boys", std::to_string(boys.size()) +
" record read",
true);
25 logger.
log(
"girls", std::to_string(girls.size()) +
" record read",
true);
26 logger.
log(
"gifts", std::to_string(gifts.size()) +
" record read",
true);
28 std::vector<Couple> couples =
makeCouples(&boys, &girls, &logger);
30 logger.
log(
"couples", std::to_string(couples.size()) +
" formed",
true);
32 logger.
info(
"Couples list",
true);
33 for (
int i = 0; i < (int)couples.size(); i++)
34 logger.
log(
"couple"+std::to_string(i+1),
35 couples[i].boy.name+
" and "+couples[i].girl.name,
true);
std::vector< Gift > readAllGifts(std::string filename)
void info(const std::string msg, bool print=false)
void log(const std::string type, const std::string msg, bool print=false)
std::vector< Girl * > readAllGirls(std::string filename)
std::vector< Boy * > readAllBoys(std::string filename)
int main(int argc, char **argv)
std::vector< Couple > makeCouples(int k, std::vector< Boy * >, std::vector< Girl * >, Logger *logger)