我在main函数外定义了这么一段
struct
{
int value;
int cnt;
int child[100];
cmpp();
void paixu()
{
sort(child,child+cnt,cmpp);
}
}node[101];
bool cmpp(int x,int y)
{
return node[x].value>node[y].value;
}
就是这个:
编译过不了,提示大意就是不认识cmpp()这个比较函数。求助各位大大怎么改才可以呢。
完美解决。非常感谢诸位大佬!!