Monday, 21 May 2018

"Reading Line By Line From FILE"

"Nice One Program"

#include<iostream.h>
#include<fstream.h>
#include<conio.h>


void main()
{       clrscr();      const int MAX=80;
  char ln[MAX];
ifstream obj("rvnow.txt");
while(!obj.eof())
{
obj.getline(ln,MAX);
cout<<ln<<endl;
}
obj.close();

getch();

}







No comments:

Post a Comment