Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. [code]...
  2. char strlit[17] = " Sup team? ";
  3. Find_word_trim(&strlit,1);
  4. ...[code]
  5.  
  6. void Menu_Opt(char *line[17], int set)
  7. {
  8. int setno;
  9. bool on_set=false;
  10. int i = 0;
  11. while(line[i]!=NULL)
  12. if(line[i]=='[' || line[i]==']')
  13. {
  14. if (line[i]='[')
  15. {
  16. setno++;
  17. }
  18. line[i]=' ';
  19. }
  20. else if(isspace(line[i]) && isgraph(line[i+1])&&!on_set)
  21. {
  22. if(setno==set)
  23. {
  24. line[i]='[';
  25. on_set=true;
  26. }
  27. else
  28. {
  29. setno++;
  30. }
  31. }
  32. else if(isspace(line[i]) && isgraph(line[i-1])&&on_set)
  33. {
  34. line[i]=']';
  35. }
  36. i++;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement