C++ implementation of mapex project