How to read files in a loop?
May 21, 2011 at 2:57pm
I want to read content of 20 files in a loop.
How can I do that?
May 21, 2011 at 3:50pm
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.