Some exercise using C++.