MOCCS implementation in C++