Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void fun()
- {
- for(n=0,m=0;m<strlen(str1);m++)
- {
- switch(str1[m])
- {
- case(' '):
- {n=-1; break;}
- default:
- {if(n==-1) n=0; sp[n]=str1[m]; n++;}
- }
- if(n==-1)
- {
- cout << sp << endl;
- rlink* newlink = new rlink;
- newlink->data = sp;
- newlink->next = first;
- first=newlink;
- n=0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement