How to read files in a loop?

I want to read content of 20 files in a loop.

How can I do that?
1
2
3
4
5
6
char *files[20];
//fill array with file names
for( int i = 0; i < 20; i++ ) {
  ifstream file( files[i] );
  //read data
}
Topic archived. No new replies allowed.