There is such an educational task:
Create two text files, remove all numbers contained in both files at the same time from the first file. Additional arrays and files do not use.
I create files like this:
ofstream fout("1.txt"); fout << "619"; fout.close(); system("pause"); ofstream fout1("2.txt"); fout1 << "618"; fout1.close(); system("pause"); Next, you need to compare the data and delete. How to implement it?
setcontainers (or, say,vectorand sort), use theset_differencealgorithm ... - Harry