我正在尝试编写一个带有链表的C语言程序,该链表使用递归来计算链表节点的总数。然而,我得到了这个错误: passing argument 1 of 'count' from incompatible pointer type [-Wincompatible-pointer-types这是没有递归的链表节点。它没有错误地工作,并返回我需要的值。++; }
ret
我一直在添加输出语句以缩小错误,它似乎来自于行:curr.setNext(n);在addNode()函数中。但是,这是输出:(2) Curr is pointing to: 0x22c9a0, The location of n is:0x22c960
(1) Curr is pointing to: 0x22c9a0