To Read Text From File
"Nice One Program"
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
void main()
{ clrscr();
int a;
char ch;
double d;
char cobj[5];
ifstream rvobj("rv.txt");
rvobj>>a>>ch>>d>>cobj;
cout<<"Data Read From File\n";
cout<<a<<endl;
cout<<ch<<endl<<d<<endl<<cobj;
getch();
}
"Nice One Program"
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
void main()
{ clrscr();
int a;
char ch;
double d;
char cobj[5];
ifstream rvobj("rv.txt");
rvobj>>a>>ch>>d>>cobj;
cout<<"Data Read From File\n";
cout<<a<<endl;
cout<<ch<<endl<<d<<endl<<cobj;
getch();
}
No comments:
Post a Comment