How would you go to give the same name to the outputfile as the inputfile?
I know that Windows will add (2) to the name but that wouldnt matter.
Code:int main (int argc, char* argv[]){ ifstream TheFile ("1.txt"); ofstream TheCopy; TheCopy.open (TheFile,ios::app); TheCopy << "hello"; TheFile.close(); TheCopy.close(); }