Void QueueAppend (LQueue * Q, int x)
{
LQNode * p=(LQNode *) malloc (sizeof (LQNode *)); + + + + + + + + + + + + + + +
P - & gt; Data=https://bbs.csdn.net/topics/x;
P - & gt; next=NULL;
If (Q - & gt; Rear!=NULL)
Q - & gt; Rear - & gt; Next=p;
Q - & gt; Rear=p;
If (Q - & gt; Rear==NULL)
Q - & gt; The front==p;
}
A void RadixSort (int * and an int n, m int, int d)
{
Int I, j, k, power=1;
LQueue * tub;
Tub=(LQueue *) malloc (sizeof (LQueue) * d);
for(i=0; i
for(i=0; i
Power=1;
The else
Power=power * d;
For (j=0; j
QueueAppend (& amp; Tub [k], a [j]); + + + + + + + + + + +
}
K=0;
For (j=0; j
QueueDelete (& amp; Tub [j], & amp; A, [k]).
k++;
}
}
}
I use RadixSort call QueueAppend but debugging to mark the + + + + + statements occurs after the breakpoint, the compiler is vs2012
CodePudding user response:
LQNode * p=(LQNode *) malloc (sizeof (LQNode * ));=========================
Application is a pointer, wrong, should be a structure
CodePudding user response: