struct sound
{
short rec_sound[256];
struct sound *next;
}
struct sound *head_q1;
struct sound *p_q1,*p_q2;
int n_q=0;
head_q1=NULL;
p_q1=(struct sound*) malloc(sizeof(struct sound));
p_q2=(struct sound*) malloc(sizeof(struct sound));
while(***) {
***// main code..
n_q=n_q+1;
memcpy(p_q1->rec_sound,DATA_In,256*sizeof(short));
if(n_q==1) head_q1=p_q1;
else p_q2->next=p_q1;
p_q2=p_q1;
p_q1=(struct sound*) malloc(sizeof(struct sound));
}
p_q2->next=NULL;
free(p_q1);
如何将,以head_q1为链表头的整个链表存于某个bank,如bank2?
「该帖子被 yan851224 在 2012-03-02 21:48:13 编辑过」