atoi():将一个字符串转换为int型数
int atoi(const char *str)
{assert(NULL != str);int num=0, sign=1;while (*str == '' || *str == '\t'){str++;}if (*str == '-'){sign=-1;str++;}else if (*str == '+'){sign=1;str++; }while (*str != '\0'){if ((*str >= '0') && (*str <= '9')){num = num * 10 + (*str - 0x30); }str++;}return(sign * num);
}