fork(3) download
  1. #include <iostream>
  2. #include <cstring>
  3. int main()
  4. {
  5. char largechars[] = "q=test&use=bingo";
  6. char* chars_array = strtok(largechars, "&");
  7. while(chars_array)
  8. {
  9. std::cout << chars_array << '\n';
  10. chars_array = strtok(NULL, "&");
  11. }
  12. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
q=test
use=bingo