C++ examples for File Stream:stream
Read character with rdbuf method from a file
#include <fstream> #include <iostream> using namespace std; int main()//from ww w .ja v a2 s . co m { ifstream infile("TEST.TXT"); //create file for input cout << infile.rdbuf(); //send its buffer to cout cout << endl; return 0; }