fork(84) download
  1. #include <iostream>
  2. #include <cstring>
  3. int main()
  4. {
  5. char largechars[] = "def1:def2:def3#abc1:abc2:abc3#ghi1:ghi2:ghi3";
  6. char* chars_array = strtok(largechars, "#:");
  7. while(chars_array)
  8. {
  9. // MessageBox(NULL, subchar_array, NULL, NULL);
  10. std::cout << chars_array << '\n';
  11. chars_array = strtok(NULL, "#:");
  12. }
  13. }
  14.  
Success #stdin #stdout 0s 2724KB
stdin
Standard input is empty
stdout
def1
def2
def3
abc1
abc2
abc3
ghi1
ghi2
ghi3