For example, I can do this :
uint64_t a = 100;
BigInteger b = a;
But I can't do this :
BigInteger a = 100;
uint64_t b = a;
Is there any way? Thanks.
For example, I can do this :
uint64_t a = 100;
BigInteger b = a;
But I can't do this :
BigInteger a = 100;
uint64_t b = a;
Is there any way? Thanks.
Problem solved!
operator uint64_t() {return get_integer();}
Thanks for your help.
The simplest solution is to make BigInteger
implicitly convertible to uint64_t
. This can be achieved with a conversion operator:
BigInteger::operator uint64_t();