I have the following problem: My program is supposed to read data from files to an array. The files are numbered: capture[1].bmp,capture[2].bmp and so on. And I really don't want to do the same step for so many times. Is there a way to write a loop along the lines of
for (int i=1; i<25, i++);
{
fopen ("C:\capture[i].bmp","r")
fread(ch,sizeof (ch),1,fp);
.....
}
In other words, is there a way to insert the "i" variable into the filename?
Thank you for your insights.
for (int i=1; i<25, i++);
{
fopen ("C:\capture[i].bmp","r")
fread(ch,sizeof (ch),1,fp);
.....
}
In other words, is there a way to insert the "i" variable into the filename?
Thank you for your insights.
Comment