#include    <stdio.h>
#include    <stdlib.h>
#include    <string.h>

int string2int(char *arg){
    char c;
    int i,j,tmp=0,tmpc=0;
    for (i = 0; i < strlen(arg); i++) {
        c=(*(arg+i));
        tmp=tmp*10+(int)c-48;
    }
    return tmp;
}

使用语言,C/C++;

相关文章:

  • 2021-12-04
  • 2022-02-13
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案