What's New-Given Below
technicalsymposium
technicalsymposium
technicalsymposium

Share Our Page Contents

C++ Lab Codings

Technicalsymposium.com-Receive Latest Updates through Facebook-Like us Below

C++ Program for READING CONTENT FROM THE FILE.

#include<iostream.h>
#include<fstream.h>
#include<conio.h>
void main()
{
clrscr();
char c[25];
ifstream ifs("h:\\first1.txt");
cout<<"\n\n\t\tFILE CONTENT\n\n";
while(!ifs.eof())
{
cout<<"\nPosition : "<<ifs.tellg();
ifs.getline(c,20);//READING FROM THE FILE
cout<<"\nPosition : "<<ifs.tellg()<<"\tcontent : ";
cout<<c<<endl;
}
getch();
}

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com