how to read until eof from cin in c 2b 2b

Solutions on MaxInterview for how to read until eof from cin in c 2b 2b by the best coders in the world

showing results for - "how to read until eof from cin in c 2b 2b"
Ronnie
23 Sep 2017
1#include <iostream>
2#include <iterator>
3#include <string>
4
5int main()
6{
7  std::istreambuf_iterator<char> begin(std::cin), end;
8  std::string s(begin, end);
9  std::cout << s;
10}
11
similar questions
queries leading to this page
how to read until eof from cin in c 2b 2b