I've been learning c++ for a while. Recently I saw a format of passing function parameters. It looks like this
typedef struct LNode {
int data;
struct LNode* next;
} LNode, *LinkList;
bool insertData(LinkList &L, int i){
cout << l;
return false;
}
I know that LinkList
is equivalent to LNode*
which means a head pointer. But what does LinkList &
aka LNode* &
mean under the circumstances?
It seems to me that passing a LNode*
aka LinkList
would be enough.