Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- while(1){
- std::string str;
- std::cin>>str; // Read a string
- std::cout<<"""<<str<<"""<<std::endl<<std::flush;
- str.clear();
- sleep(1);
- }
- }
- abi@linux:~/Tst> ./a.out << EOF
- > Hi
- > How
- > are
- > You
- > EOF
- "Hi"
- "How"
- "are"
- "You"
- ""
- ""
- ""
- ""
- ""
- ""
- *i entered <ctrl+C> here to stop the program*
- abi@linux:~/Tst>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement