... all_of(a.cbegin(), a.cend(), isGreaterThan10)) {
 74        cout << "\n\nAll the elements in a are greater than 10";
 75     }
 76     else {
 77        cout << "\n\nSome elements in a are not greater than 10";
 78     }
 79
 80     // determine whether any of the elements of a are greater than 10
 81     if (any_of(a.cbegin(), a.cend(), isGreaterThan10)) {
 82        cout << "\n\nSome of the elements in a are greater than 10";
 83     }
 84     else {
 85        cout << "\n\nNone of the elements in a are greater than 10";
 86     }
 87
 88     // determine whether none of the elements of a are greater than 10
 89     if (none_of(a.cbegin(), a.cend(), isGreaterThan10)) {
 90        cout << "\n\nNone of the elements in a are greater than 10";
 91     }
 92     else {
 93        cout << "\n\nSome of the elements in a are greater than 10";
 94     }
 95
 96     // locate ...

Get C++ How to Program, 10/e now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.