C 库函数 - atoi()
描述
C 库函数 int atoi(const char *str) 把参数 str 所指向的字符串转换为一个整数(类型为 int 型)。
声明
下面是 atoi() 函数的声明。
int atoi(const char *str)
参数
str – 要转换为整数的字符串。
返回值
该函数返回转换后的长整数,如果没有执行有效的转换,则返回零。
C 标准库 - <stdlib.h>
C 库函数 - atoi()
描述
C 库函数 int atoi(const char *str) 把参数 str 所指向的字符串转换为一个整数(类型为 int 型)。
声明
下面是 atoi() 函数的声明。
int atoi(const char *str)
参数
str – 要转换为整数的字符串。
返回值
该函数返回转换后的长整数,如果没有执行有效的转换,则返回零。
C 标准库 - <stdlib.h>