Can anyone please tell why this doubly linkedlist func is not working

Please help with doublelinkedlist Insert at begin func please see the code why It is not running .

@rssrivastavarohan
There are few mistakes in your code.

  1. data member and member function of a class can’t be access directly. To access them make them public.
  2. if head!=NULL, you forget to write head->prev=newNode;
    I modified your code. Check it here https://ide.codingblocks.com/s/231016

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.