codice:
#include <sstream>
...


codice:
    for (int i=1; i<11; i++) 
    { 
        ostringstream filename;

        filename << "file" << i << ".txt";
        ifstream file(filename.str().c_str());
...