Data transfer one file to an other file.
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main() {
string mond;
fstream book, filing;
book.open("jon.txt", ios::app);
if (!book)
{
cout << "File
Does Not Exist";
}
else
{
cout << "File Is
Create Successfully " << endl;
}
filing.open("game.txt", ios::in);
if (!filing)
{
cout << "File
Does Not Exist";
}
else {
cout << "File Is
Create Successfully " << endl;
}
book << "\t game";
book << endl;
while (!filing.eof())
{
getline(filing, mond);
book << mond;
}
filing.close();
book.close();
cout << endl;
system("pause");
}
Comments
Post a Comment