I can make this program to copy diverse format wihout losts.
example:
C:\\animal.exe to D:\\animal.exe
(The File location write in locale)
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
char data[50];
char inputFile [100];
cout <<"Insert inputFilePatch :"<<endl;
cin >> inputFile;
ifstream inputFilePatch;
inputFilePatch.open(inputFile);
if(!inputFilePatch) {
cout << "Wrong Location!!!\n";
system("PAUSE");
return 1;
}
char outputFile[100];
cout<<"Insert outputFilePatch "<<endl;
cin >> outputFile;
ofstream outputFilePatch;
outputFilePatch.open(outputFile);
outputFilePatch<<data;
while(inputFilePatch>>data){
outputFilePatch<<data<< endl;
};
outputFilePatch.close();
system("PAUSE");
return 0;
}
This is exactly just for .txt files!
What to change to work these?