I'm trying to convert an extra large hex number to decimal number in C++.
For example:
hex: abc6a806bf5ac415016905a8de6e026c
decimal: 228329470036614264874173405720560403052
I wanna to get decimal % 60 = 52 from the example above.
I know I can do something like
int(abc6a806bf5ac415016905a8de6e026c, 16) % 60
in python
but I don't know how to implement in C++
You can't convert
abc6a806bf5ac415016905a8de6e026cinto an integer type because that will overflow.But if all you want is
x % 60then you can perform all operations modulo 60 when converting "abc6a806bf5ac415016905a8de6e026c" to integer: