void show(struct _Node (*fun)(struct _Node *head))
{
struct _Node *pTemp = NULL;
pTemp = (*fun)(head); //就是这里vc提示head无定义,那么该怎样调用呢
这个函数类是型如 struct _Node *QueryQQ(struct _Node *head) 的一类函数
error。 binary '=' : no operator defined which takes a right-hand operand of type 'struct _Node' (or there is no acceptable conversion)
还是有错,我不明白是怎么回事
哦,应该是 *pTemp = fun(head);因为你定义的fun函数是返回_Node而不是_Node*,或者你修改你下的函数,返回指针就可以了~
其实就是为了简化一下代码,不想写那么冗长