You are viewing a single comment's thread. Return to all comments →
Why is this code not working? What is missing? Anyone could let me know?
int GetNode(struct Node, int positionFromTail) { static int position = 0; int ret = 0;
if (head) { ret = GetNode(head->next, positionFromTail); if (position++ == positionFromTail) return head->data; } return ret;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Get Node Value
You are viewing a single comment's thread. Return to all comments →
Why is this code not working? What is missing? Anyone could let me know?
int GetNode(struct Node, int positionFromTail) { static int position = 0; int ret = 0;
}