Sponsored Links

#include<iostream.h>
#include<fstream.h>
main()
{
ifstream bill;
char file []="Elec_Bil.txt";
const int a=100;
char fullText[a];
bill.open(file);
if(!bill)
{
cout<<"Error the file is not exist"<<file<<endl;
exit(1);
}
while(!bill.eof())
{
bill.getline(fullText,a);
cout << fullText << endl;
}
bill.close();
system("pause");
}