fork(1) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main() {
  5. std::string s("mamku;v;jopu;ipal");
  6. char c = ';';
  7. for (int i = 0; i < s.size(); ++i) {
  8. if (s[i] == c)
  9. std::cout << std::endl;
  10. else
  11. std::cout << s[i];
  12. }
  13. std::cout << std::endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
mamku
v
jopu
ipal