Advertisement
Guest User

crossword

a guest
Jan 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void function(char* crossword,int size,char** dictionary)
  2. {
  3. int k = -1;
  4. for (size_t i = 0; i < size-1; i++)
  5. {
  6. if (isLetter(crossword[i]) && isLetter(crossword[i+1]))
  7. {
  8. k++;
  9. char word[40];
  10. int j = 0;
  11. word[j] = crossword[i];
  12. i++;
  13. j++;
  14. word[j] = crossword[i];
  15. i++;
  16. j++;
  17. while (i < size && isLetter(crossword[i]))
  18. {
  19. word[j] = crossword[i];
  20. j++;
  21. i++;
  22. }
  23. for (size_t t = 0; t < j; t++)
  24. {
  25. dictionary[k][t] = word[t];
  26. }
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement