以往遇到行排列问题(按每行的字典序排序)的时候,总是使用结构体来进行排序,但是如何使用二维数组来达到同样的效果呢?...];
}
int main()
{
int a[6][3] = { {1,4,3}, {1,4,7} , {1,3,5} , {2,9,4} , {2,5,8} , {3,9,6} };
//sort...sort((int**)a, (int**)(a+6), cmp);
for(int i = 0; i < 6; ++i)
cout<<a[i][0]<<' '<<a[i][1]<<' '<<...i < 6; ++i)
{
re[i] = new int[3];
re[i][0] = a[i];
re[i][1] = b[i];
re[i][2] = c[i];
}
sort...main()
{
vector> vec = { {1,4,3}, {1,4,7} , {1,3,5} , {2,9,4} , {2,5,8} , {3,9,6} };
sort