I have two functions partialReverse(node & , int) and reverseList(node &).The first one reverses the list by k amounts and the reverse functions reverses the entire list. The first function returns the head of the linked list, i.e. it has return type node . But in my main function when i write reverseList(partialReverse(head, k)), there comes an error saying - error: cannot bind non-const lvalue reference of type 'node &’ to an rvalue of type 'node* '. Please explain.
Lvalue rvalue error
Pls share your complete code…where you are getting error so that I could check it.