An implementation in C++ of Kopf-Lischinski algorithm