I need to open undefined number of files with ofstream to write in. the file names should have a format of plot1.xpm, plot2.xpm, plot3.xpm,... . The program looks like this: I don't know what should I place in stars.
for(m = 0; m < spf; m++){
//some calculations on arr[]
ofstream output(???);
for(x = 0; x < n; x++){
for(y = 0; y < n; y++){
if (arr[x*n + y] == 0)
output<<0;
else output<<1;
}
output<<'\n';
output.close();
}