int 转 string int a = 13; string str = to_string(a); string转int std::string str = "123"; int n = atoi(str.c_str());