CPP version of hwcfrog