Add C++ implementation

Hi,

I liked your idea about having different implementations of this algorithm, as I'm new to GitHub I thought it would be a good idea to contribute. This change adds a cpp file with the C++ implementation using some new features of the C++11 standard. In order to compile with g++ the -std=c++11 flag is needed.

The code is basically the original ruby implementation translated to C++, this was done in purpose, feel free to suggest any changes for a better design (more C++-ish).

Thanks!