#include<string.h>
#include<algorithm>
using namespace std;
struct s
{
int d;
char c[10];
}ss[15];
bool cmp(s a,s b)
{
if(strcmp(a.c,b.c)!=0)
return strcmp(a.c,b.c)<0;
else
return a.d<b.d;
}原文:http://blog.csdn.net/wangluoershixiong/article/details/38485447