linux链表操作问题
linux 平台下,操作链表报错,请教各位insert_pool(struct pool *head,struct pool *new)
{
printf("Insert starting ....:%x\n",&head);
if((head)==NULL)
{
(head)=new;
}
else
{
new->next=(head);
(head)->pre=new;
(head)=new;
}
}
这样编译后,执行的是链表的备份。采用引用参数,编译报错,错误是 函数定义这句有问题:expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
insert_pool(struct pool *&head,struct pool *&new)
高手指点一下