Error in ">>" and "<<" Overloading in Linked List!

In the video prateek bhaiya has only explained linked list with HEAD pointer only.

But in my program I have created Liked List using HEAD & TAIL both pointers.

So how can I overload “>>” and “<<” to get the correct output as explained in the video.

My code Link -> https://ide.codingblocks.com/s/452195

Note :- Run this code in NON-CP based Editor, like VS CODE.

Thank you😊

function takes exactly one argument you can’t pass more than one argument in the function

here we can do something like this

ostream &operator<<(ostream &os, Node* head)
{
	Node* tail = NULL;
    printList(head, tail);

    return os; // return cout
}

istream &operator>>(istream &is, Node* &head)
{
	Node* tail = NULL;
    takeInput(head, tail);

    return is; // return cin;
}

It’s showing me this error making the changes that you said to me -> https://ide.codingblocks.com/s/452613

i don’t know what you have done

this is correct approach (i have only change 2 function that i mention above)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.