cpp#includeusingnamespacestd;structnode{chardata;node*next;};;node*Create();;voidshow(node*head);intmain(){node*head;head=Create();show(head);return0;}node*Create(){chartemp;node*head=NULL;node*next=NULL;node*r=head;node*PS;coutnext=NULL;if(head==NULL){head=PS;}else{r->next=PS;}r=PS;}returnhead;}voidshow(node*head){node*read=head;while(read!=NULL){coutnext;}cout
C++創(chuàng)建鏈表問題
元芳怎么了
2019-04-07 11:19:18