An implementation of vfmd in C++