function
2nd,
int countNode(node *head, char value)
countNode()
countNode is not called correctly, you need to pass the parameters to the function
and as a fix you need to return a referance to the node that repeats in the linked list so you will need to pass a new node by referance
int countNode(node *head, char value, node *nodePtrIfFount)
so that nodePtrIfFount will be your cur node.
3rd,
class Set
{
private:
node *head, *tail;
public:
void myList()
{
head = NULL;
tail = NULL;
}
}
where is the constructor and what is this function?
4th,
node *temp = new node;
temp = head;
this could be put like
node *temp = head;
that's hell of a help, i'll rewrite this shit tomorrow ❤️
Обсуждают сегодня