Jus*_*ing 3 c++ windows visual-studio-2008 visual-c++
对于 Visual Studio 2008 ,是否有另一种方法(内置于 Windows 或与 apache 许可证兼容)来替代stoll()。即使安装 Windows 7 平台 SDK 也不会将 stoll() 添加到字符串标头。
在 unix 上,相同的函数被称为strtoll()。
您可以使用_strtoi64
。它是在 中声明的stdlib.h
。
long long num = _strtoi64(str, NULL, 10);
Run Code Online (Sandbox Code Playgroud)
与 类似strtoll
,您可以传递 achar ** endptr
作为第二个参数。如果是这样,*endptr
将被设置为第一个无效字符(可能是正常的空终止符)。
归档时间: |
|
查看次数: |
2214 次 |
最近记录: |