#include #include #include #include #include /// Implementera sum_and_max() och print_pair() int main() { std::cout << "==== Testfall #1 ====" << std::endl; // Enkelt testfall std::vector v1 { 1, 2, 4, 3}; auto v1_pair { sum_and_max(v1.begin(), v1.end()) }; print_pair(v1_pair); std::cout << "==== Testfall #2 ====" << std::endl; // Testa std::list (en annan behållare än std::vector) std::list names { "PONTUS ", "CHRISTOFFER ", "ERIC ", "MALTE ", "NILS ", "EDVIN" }; auto names_pair { sum_and_max(names.begin(), names.end()) }; print_pair(names_pair); }