Linq Challenge in C++

Taking what seems to be a simple LINQ task (in C#) and converting it to C++.