Advertisement
constantin-net

lesh

Dec 2nd, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. void fun()
  2. {
  3. for(n=0,m=0;m<strlen(str1);m++)
  4. {
  5. switch(str1[m])
  6. {
  7. case(' '):
  8. {n=-1; break;}
  9. default:
  10. {if(n==-1) n=0; sp[n]=str1[m]; n++;}
  11. }
  12. if(n==-1)
  13. {
  14. cout << sp << endl;
  15. rlink* newlink = new rlink;
  16. newlink->data = sp;
  17. newlink->next = first;
  18. first=newlink;
  19. n=0;
  20. }
  21. }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement