fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. int main() {
  7. string s="1,2,3,4,5";
  8. char cl=',';
  9. for(string::iterator it=s.begin();it!=s.end();++it)
  10. if (*it == cl)
  11. cout << endl;
  12. else cout << *it;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
1
2
3
4
5