Use to_ulong
to convert it to unsigned long
, then an ordinary cast to convert it to int
.
int mybit_int;
mybit_int = (int)(mybit.to_ulong());
DEMO
Use to_ulong
to convert it to unsigned long
, then an ordinary cast to convert it to int
.
int mybit_int;
mybit_int = (int)(mybit.to_ulong());
DEMO