string 转 int,int 转 string string str="12345"; int b=atoi(str.c_str());可以配合atof,转为doublechar buf[10];sprintf(buf, "%d", 100);string b = buf;