I have a program where I need to periodically output some data to an external file. That is to say, each 10 iterations I want to save the info in sequentially numbered external files, something like this
out10.txt for ite 10
out20.txt for ite 20
out30.txt for ite 30
and so on. I wonder how can I implement this using ofstream in c++.