atol
来自cppreference.com
< cpp | string/byte
语法:
#include <cstdlib> long atol( const char *str );
函数 atol() 将str转换为长整型,然后返回它。atol()读取str直到发现不应该出现在长整型中的字符。 截断过的值将被转换并返回。例如,
x = atol( "1024.0001" );
结果x将被设置为 1024L.
相关主题: atof, atoi, cn/c/io/sprintf, strtol