I am trying to generate a node for a linked list inside a for loop. I have defined the nodes for the head, tail and a temporary node(which stores the data). But when I include it inside a for loop and print the results, it does not return anything. Any suggestions on how can I improve my code?
private:
Node *head;
Node *tail;
};