Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. int main()
  2. {
  3. while(1){
  4. std::string str;
  5. std::cin>>str; // Read a string
  6.  
  7. std::cout<<"""<<str<<"""<<std::endl<<std::flush;
  8. str.clear();
  9.  
  10. sleep(1);
  11. }
  12. }
  13.  
  14. abi@linux:~/Tst> ./a.out << EOF
  15. > Hi
  16. > How
  17. > are
  18. > You
  19. > EOF
  20. "Hi"
  21. "How"
  22. "are"
  23. "You"
  24. ""
  25. ""
  26. ""
  27. ""
  28. ""
  29. ""
  30. *i entered <ctrl+C> here to stop the program*
  31. abi@linux:~/Tst>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement