Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how-to-read-until-eof-from-cin-in-c++

#include <iostream>
#include <iterator>
#include <string>

int main()
{
  std::istreambuf_iterator<char> begin(std::cin), end;
  std::string s(begin, end);
  std::cout << s;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+2 =