Home > Back-end >  Cause of untreated exception: read access conflict. 0 XCDCDCD
Cause of untreated exception: read access conflict. 0 XCDCDCD

Time:10-04

Questions is to get the list output in reverse, I main function in cites a
Reversed to the original data in the list and then submitted to the wrong, I want to ask next is where there is error,
Void movelist (sqlist * L) {
Sqlist * p * q;
P=L - & gt; next;
L - & gt; Next=NULL;
while(p!=NULL) {
Q=p - & gt; next;
P - & gt; Next=L - & gt; next;
L - & gt; Next=p;
P=q;
}
}

CodePudding user response:

You have a program logic problem,,,,,,,,,,

CodePudding user response:

Has solved this problem last night

CodePudding user response:

To create a new empty list, and then using the method of head, the linked list node is inserted into the empty list, you can print in reverse chronological order,

CodePudding user response:

reference code response: 3/f
create a new empty list, and then using the method of head, will be inserted into the empty list node list, you can reverse printing,

Thank you, is to use this method to solve the last night
  • Related