//字符串转数字 int num = 0; istringstream(str) >> num; //数字转字符串 to_string(10); //排序(倒序) sort(a, a + n, greater());