I was wondering in a doubly linked list how do check to see if the initial list you have is Null?

This what I have (would this be correct):

node *middleOut(struct node*LL)
{
      node *current = LL;
     if(current == NULL)
     {   cout<<"empty list";    }


      //Rest of code is down here
}

yes..this is correct provided that the pointer
> struct node* LL
you are passing is the starting of the linked list. ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.