C++ version of the Keyed Data: Advanced example.