#include<iostream>
#include<fstream>
#include<iomanip>
using namespace std;
int main()
{
ofstream anyfile;
anyfile.open("Result.txt", ios::out);
if(!anyfile) // checking for file creation
{
cerr<<"\n File Opening Error"<<endl;
}
cout<<"\n \tFile Created Successfully...\n";
cout<<" if You Want to Keep Prevoius Data in UR Created File, Replace out with\n app in Line#8 of Code\n";
anyfile<<"\n i m a Muslim boy of Asian Timezz...\n Islam is my Life Style...\n";
anyfile.close(); //closing command of File...
system("pause");
}
#include<fstream>
#include<iomanip>
using namespace std;
int main()
{
ofstream anyfile;
anyfile.open("Result.txt", ios::out);
if(!anyfile) // checking for file creation
{
cerr<<"\n File Opening Error"<<endl;
}
cout<<"\n \tFile Created Successfully...\n";
cout<<" if You Want to Keep Prevoius Data in UR Created File, Replace out with\n app in Line#8 of Code\n";
anyfile<<"\n i m a Muslim boy of Asian Timezz...\n Islam is my Life Style...\n";
anyfile.close(); //closing command of File...
system("pause");
}
very helpful
ReplyDelete