64,647
社区成员
发帖
与我相关
我的任务
分享
bool compare(str str1, str str2)
{
return str1.i < str2.i ;
}
sort(str1.begin(), str1.end(), compare);
struct str
{
public:
std::string st;
int i;
public:
str( std::string st1, int i1): st( st1), i( i1)
{}
};