我正在尝试将 64 位整数字符串转换为整数,但我不知道该使用哪一个。
最佳答案
使用 strtoull
如果你有它或_strtoui64()
与 Visual Studio 。
unsigned long long strtoull(const char *restrict str,
char **restrict endptr, int base);
/* I am sure MS had a good reason not to name it "strtoull" or
* "_strtoull" at least.
*/
unsigned __int64 _strtoui64(
const char *nptr,
char **endptr,
int base
);
关于c++ - 在 Unix 和 Windows 上都可以使用的 C 中 64 位整数(uint64_t)的 atoi 等价物是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7502926/