SHARE
TWEET

Untitled

tinyevil Nov 16th, 2018 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top