Convert biginit.c to C++