#include <iostream>
#include <sstream>
#include <fstream>
int main()
{
std::ifstream input("file.txt");
std::stringstream sstr;
while(input >> sstr);
std::cout << sstr.str() << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPGZzdHJlYW0+CgppbnQgbWFpbigpCnsKICBzdGQ6Omlmc3RyZWFtIGlucHV0KCJmaWxlLnR4dCIpOwogIHN0ZDo6c3RyaW5nc3RyZWFtIHNzdHI7CgogIHdoaWxlKGlucHV0ID4+IHNzdHIpOwoKICBzdGQ6OmNvdXQgPDwgc3N0ci5zdHIoKSA8PCBzdGQ6OmVuZGw7Cn0=
prog.cpp: In function 'int main()':
prog.cpp:10:18: error: cannot bind 'std::basic_istream<char>' lvalue to 'std::basic_istream<char>&&'
while(input >> sstr);
^
In file included from /usr/include/c++/4.9/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/4.9/istream:872:5: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::basic_stringstream<char>]'
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^