Write a program to Show the File Data

/*
    Show the File Data
*/
#include<iostream>
#include<fstream>
using namespace std;

int main()
{
    char str[256];

    cout<<"\n\n Enter the name of the existing file: ";
    cin.get(str,256);

    ifstream is(str);
    char c;

    while(is.get(c))
    {
        cout<<c;
    }

    is.close();

    return 0;
}

Previous
Next Post »