#include #include #include #include using namespace std; struct Book { string name; int pages; }; int main() { std::vector books = { {"The Great Adventure", 320}, {"Mysteries of the Deep", 250}, {"Echoes of the Past", 310}, {"Whispers in the Wind", 230}, {"Journey to the Unknown", 293}, }; auto it = remove_if(books.begin(), books.end(), [](Book const& book){ return book.pages > 293; }); books.erase(it, books.end()); for (Book const& book : books) { cout << book.name << ": " << book.pages << endl; } }