I think there's a c ++ function you can use
Strtoll http://www.cplusplus.com/reference/cstdlib/strtoll/