Read character with rdbuf method from a file - C++ File Stream

C++ examples for File Stream:stream

Description

Read character with rdbuf method from a file

Demo Code

#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;
}

Result


Related Tutorials