#include<iostream.h>
#include<fstream.h>
using namespace std;
int main()
{
ofstream file1("name.txt");
cout<<"Enter name:";
char name[35];
cin>>name;
file1<<name;
file1.close();
ifstream fi1("name.txt");
fi1>>name;
cout<<"\n\nName:"<<name;
fi1.close();
return 0;
}
#include<fstream.h>
using namespace std;
int main()
{
ofstream file1("name.txt");
cout<<"Enter name:";
char name[35];
cin>>name;
file1<<name;
file1.close();
ifstream fi1("name.txt");
fi1>>name;
cout<<"\n\nName:"<<name;
fi1.close();
return 0;
}
0 comments:
Post a Comment