Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Zamina(TDish*&Start,string key){
- TDish *wp,*pp,*del;
- wp=Start;
- pp=NULL;
- del=NULL;
- if(Start==NULL){
- cout<<"imposible!!!"<<endl;
- }
- while(wp!=NULL){
- if(wp->name==key){
- del=wp;
- wp=wp->next;
- delete del;
- if(wp->next->name==key){
- while(pp->name==key){
- pp=wp;
- wp=wp->next;
- }
- del=wp;
- pp=wp;
- wp=wp->next;
- delete del;}}
- else{
- pp=wp;
- wp=wp->next;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement