Created
February 14, 2013 08:57
-
-
Save opavlyshak/4951436 to your computer and use it in GitHub Desktop.
Read everything from stdin in C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string text = ""; | |
std::string line; | |
while (std::getline(std::cin, line)) | |
{ | |
text = text + line + "\r\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment