Translated library to C++