最佳答案:一、string转int的方式采用最原始的string, 然后按照十进制的特点进行算术运算得到int,但是这种方式太麻烦,这里不介绍了。采用标准库中atoi函数。string s = "12"; in