Text Reading Using File Handling In Cplusplus

#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
int a;
char ch;
float b;
double c;
string s1;


ifstream infile("fdata.txt");

infile>>a
      >>ch
      >>b
      >>c
      >>s1;
      cout<<a<<ch<<b<<c<<s1;
cout<<"file written";
return 0;      
}
Text Reading Using File Handling In Cplusplus Text Reading Using File Handling In Cplusplus Reviewed by Hamza Bashir Ahmad on 06:31:00 Rating: 5