//实现int Myatoi(const char* str);//将字符串转成数字"123"->123
//" -12344 "-->-12344
//"123ab456"->123
//"13403943501498005402509"->整数能表示的最大值
//实现void Myitoa(char* str, int n);//将数字转成字符串,123->"123"
#include<limits.h> //最大值 INT_MAX
int Myatoi(const char* str)//1断言 2处理空格 3处理符号 (如果超过最大值返回最大
c语言实现atoi函数
最新推荐文章于 2024-03-27 15:14:46 发布