how to input multiple lines of a file in c 2b 2b

Solutions on MaxInterview for how to input multiple lines of a file in c 2b 2b by the best coders in the world

showing results for - "how to input multiple lines of a file in c 2b 2b"
Flora
18 Feb 2017
1#include <iostream>
2#include <fstream>
3#include <sstream>
4#include <string>
5
6using namespace std;
7
8int main()
9{
10    
11    ifstream in("file.txt");
12    stringstream sstr;
13    while(in >> sstr.rdbuf());
14    cout << sstr.str() << endl;
15
16
17
18    return 0;
19}
20