Assume we have an Objective-C `NSArray` of instances of either the `Shoe` class or the `Computer` class. Both of these classes have the method `age`.

Objective-C would allow you to obtain the ages of all the shoes and computers in one simple statement like this:

```
NSArray *agesOfShoesAndComputers = [ourArray valueForKey:@"age"];

```

Does C++ have any similar methodology that can be applied to, say, vectors, or will stuff like this necessarily always be somewhat more cumbersome in C++?