I'm writing a code that frequently uses file I/O. I have to write 10 files and read vice versa. The code is as follows:
ofstream of1("file1");
ofstream of2("file2");
ofstream of3("file3");
...
ofstream of10("file10");
It seems a messy code. Is there any way to represent those in a compact format?
Aucun commentaire:
Enregistrer un commentaire