you already said you need a loop, so I suppose you know how to do that. Inside the loop you need to format the filename based on the loop counter.
char filename[255];
// assum loop counter is variable i
sprintf(filename,"file%d.jpg",i);
utput.open(filename, ios:out|ios::binary); // output]
There are a couple of other ways too, but I think the above is about as simple and easy as it gets.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343