VC ++的std :: atoll [英] std::atoll with VC++

查看:259
本文介绍了VC ++的std :: atoll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用cstdlib中的std::atoll将带有gcc的字符串转换为int64_t. Windows工具链上似乎没有该功能(使用Visual Studio Express 2010).最好的选择是什么?

I have been using std::atoll from cstdlib to convert a string to an int64_t with gcc. That function does not seem to be available on the Windows toolchain (using Visual Studio Express 2010). What is the best alternative?

我也有兴趣将strings转换为uint64_t.取自cstdint的整数定义.

I am also interested in converting strings to uint64_t. Integer definitions taken from cstdint.

推荐答案

MSVC具有_atoi64和类似的功能,请参见

MSVC have _atoi64 and similar functions, see here

有关无符号的64位类型,请参见 _strtoui64

For unsigned 64 bit types, see _strtoui64

这篇关于VC ++的std :: atoll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆