If a function prototype is given in a 2 dimensional linked list as void InsertNode(NODE<T>*pNode, NODE<T>*pAfter,NODE<T>**pTail) , and all the necessary codings for inserting a new node is done for its function implementation, i.e,

void InsertNode(NODE<T>*pNode, NODE<T>*pAfter, NODE<T>**pTail)
{
    pNode->pNext = pAfter -> pNext;
   pNode->pPrev = pAfter;
    
   if(pAfter->pNext!=NULL)
            pAfter->pNext->pPrev = pNode;
   else
        *pTail = pNode;
    pAfter->pNext = pNode;
}

How do I call this function?

So you wrote the code but you don't know how to call a function ... really? That's pretty hard to believe.

Just call it like how you'd call any other function and pass the appropriate values into it!

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.