Home > Software engineering >  Hello everyone, I am a data structure for beginners, singly linked lists of output code below, read
Hello everyone, I am a data structure for beginners, singly linked lists of output code below, read

Time:09-24


L is a pointer to a single table structure variables, the single table is determined and finite element
The main function of wrote DispList (L);
Void DispList (LinkNode * & amp; L)//output singly linked list
{

LinkNode * p=L - & gt; next;
While (p!=NULL)
{//the problem here, there is no error at compile time
cout

P=p - & gt; next;

}
cout
}

CodePudding user response:

After 0 XCD should be your new uninitialized

LinkNode * p=new LinkNode;
P - & gt; XXX=0;
P - & gt; Next=NULL;

CodePudding user response:

Singly linked list data structure on data sort http://bbs.csdn.net/topics/392201633

CodePudding user response:

Parameter is (LinkNode * & amp; L)?
  • Related