2 # include "../couples/couple.h" 6 #include "../gifts/gift.h" 13 for (
auto it = boys.begin(); it != boys.end(); it++) {
14 cout << (*it)->name <<
' ' << (*it)->getNature() << endl;
16 for (
auto it = girls.begin(); it != girls.end(); it++) {
17 cout << (*it)->name <<
' ' << !(*it)->getNature() << endl;
22 for (
auto it = gifts.begin(); it != gifts.end(); it++) {
23 cout << (*it).name <<
' ' << (*it).price << endl;
27 std::vector<Couple> couples =
makeCouples(boys, girls, &logger);
28 cout << couples.size() <<
" couples formed" << endl;
30 for (
auto it = couples.begin(); it != couples.end(); it++) {
31 cout << (*it).boy->name <<
" and " << it->girl->name << endl;
std::vector< Gift > readAllGifts(std::string filename)
std::vector< Girl * > readAllGirls(std::string filename)
std::vector< Boy * > readAllBoys(std::string filename)
std::vector< Couple > makeCouples(int k, std::vector< Boy * >, std::vector< Girl * >, Logger *logger)