Implementation in C++