(转载)linux中atoi函数

标准C库函数
#include <stdlib.h>

原型 : int atoi( const char *str );

功能:将字符串str转换成一个整数并返回结果。参数str 以数字开头,当函数从str
          中读到非数字字符则结束转换并将结果返回。
例如:int num = atoi("1314.012");
          int值为1314

原文链接:https://blog.csdn.net/oLinXi1234567/article/details/24363629

posted @ 2022-12-18 22:21  Adosa(无嗔)  阅读(122)  评论(0编辑  收藏  举报
levels of contents