Advertisement
tinyevil

Untitled

Nov 16th, 2018
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. const char** words = new const char*[future final_n];
  2. size_t n = 0;
  3. size_t len = strlen(s);
  4. size_t begin = 0;
  5. for ( size_t i = 0; i < ; i++ ){
  6.     if ( s[i] == '\0' || s[i] == ' ' ){
  7.         n++;
  8.         words[n] = s + begin;
  9.         s[i] = '\0';
  10.         begin = i + 1;
  11.     }
  12. }
  13. size_t final_n = n;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement