我正在尝试使用返回指针的函数,但我不确定如何声明它们。
这是我目前编写的函数,item 是我的结构的名称,queue 是我的类的名称 - 如果它只是写在 main 中,它只会是:item * divide(item *a):
item queue:: *divide(item *a)
{
    item *b, *c;
    b = a;
    c=a->next;
    c=c->next;
    while(c != NULL)
    {
         c=c->next;
         b=b->next;
         if (c!=NULL)
             c=c->next;
    }
c=b->next;
b->next = NULL;
return c;
}
正确的方法是什么?