Convert bignum.c to C++